我一直在用 discord.py(重写分支)编写一个机器人程序,我想添加一个禁止命令。机器人仍然没有禁止该成员,它只是显示一个错误:
@client.command(aliases=['Ban'])
async def ban(ctx,member: discord.Member, days: int = 1):
if "548841535223889923" in (ctx.author.roles):
await client.ban(member, days)
await ctx.send("Banned".format(ctx.author))
else:
await ctx.send("You don't have permission to use this command.".format(ctx.author))
await ctx.send(ctx.author.roles)
它会禁止被 ping 的用户并确认它确实禁止了
Qyouu
慕工程0101907
相关分类