有没有办法检测用户(而不是机器人本身)何时发送了消息?我知道on_message事件允许与预期的命令/响应(https://discordpy.readthedocs.io/en/latest/api.html)进行比较,但对于我的项目,没有设置用户响应。这使得机器人每次检测到自己的消息时都会触发。我怎么才能修复它呢?
发布于 2020-09-08 16:13:36
尝尝这个
client = discord.Client()
@bot.event
async def on_message(message):
if message.author == client.user:
return
#then write the code down here so if the person who send message is bot it wont counthttps://stackoverflow.com/questions/63788310
复制相似问题