📜  discord.py 回复消息 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:14.968000             🧑  作者: Mango

代码示例5
@bot.event
async def on_message(message):
    if isinstance(message.channel, discord.channel.DMChannel) and message.author != bot.user:
        await message.channel.send('This is a DM')