【发布时间】:2021-05-07 00:33:38
【问题描述】:
我想让我的不和谐机器人在每次特定用户在聊天中发送消息时做出响应。代码运行,但当该用户发送消息时没有任何反应。
这是我迄今为止尝试过的:
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.author.id == '546474118711869440':
await message.channel.send('shhhhh')
【问题讨论】:
标签: python discord.py bots