如果用户滥用我的机器人(比如垃圾命令之类的东西),我如何让Bot排除某人的使用?footer = f'User-ID: ' + str(ctx.author.id) + ' Made by Ohnezahn DNC#8135 with discord.pyGrund:\n\n{banreason}")
with open('<
我一直在用discord.py (重写分支)编写一个机器人程序,我想添加一个ban命令。机器人仍然不会禁止该成员,它只是显示一个错误: @client.command(aliases=['Ban']) if "548841535223889923" in (ctx.author.roles):
await client.
这段代码没有任何错误,但bot仍然不会告诉非管理员用户他们没有权限,它只是停留在终端上,我在这里做错了什么,bot不会这么说,或者我需要修改什么来修复它,也可以使用discord.py重写。user with a reason@commands.has_any_role("Keyblade Master","Foretellers") await ctx.channel.send("You cannot ban