【发布时间】:2021-07-13 22:05:35
【问题描述】:
@client.event
async def on_message(message):
if message.author.nick == f"[AFK] {message.author.name}":
print("AFK Guy detected")
who = message.author
await who.edit(nick=f"{message.author.name}")
await message.channel.send(f"Hey, {message.author.mention} welcome back, I removed your AFK.")
await client.process_commands(message)
当用户 AFK 并返回并发送消息时,它不会重新更改他的名字或做任何事情 这是为什么呢?
【问题讨论】:
-
是否曾经在控制台打印过“AFK Guy Detected”?
-
它永远不会打印
标签: python python-3.x discord discord.py