📌  相关文章
📜  如何使用 discord.py 踢和禁止成员 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:10.182000             🧑  作者: Mango

代码示例1
@client.command()
@commands.has_permissions(kick_members=True)
async def kick(ctx, member: discord.Member, *, reason=None):
    if reason==None:
      reason=" no reason provided"
    await ctx.guild.kick(member)
    await ctx.send(f'User {member.mention} has been kicked for {reason}')