(更新:已解决问题)您可以使用以下我制作的踢球命令代码:
@bot.command(pass_context=True)
async def kick(ctx, user: discord.Member):
author = ctx.message.author
if author.server_permissions.kick_members:
await bot.kick(user)
await bot.say("{} has been kicked!".format(user.name))
else:
await bot.say("You do **NOT** have permission to run this command!")
非常感谢abccd提醒我将await
放在bot.kick(user)
的前面。