【发布时间】:2021-02-24 14:16:46
【问题描述】:
你好
我想做什么
您好,我正在尝试向触发以下功能的用户发送 DM:
if message.content.startswith("!help"):
await message.author.send("hello")
在用户将 !help 发送到任何不和谐的服务器频道后,我希望机器人向用户发送消息 Hello as a DM
问题
我没有收到任何错误,如果我在聊天中输入 !help 就什么也没有发生
我是初学者,所以我很高兴能得到所有帮助 =)
【问题讨论】:
-
我试过
@client.event @bot.command @client.event.,函数是async def on_message(message):
标签: python function discord discord.py dm