📜  discord bot回复私信python代码示例

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

代码示例1
@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')