📌  相关文章
📜  discord.py 检查用户是否是机器人 - Python 代码示例

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

代码示例1
@bot.command()
async def kick(ctx, user: discord.Member, *, reason="No reason provided"):
    if not user.bot:
        await user.kick(reason=reason)
        await ctx.send(f"Successfully kicked {user}!")
    else:
        await ctx.send("You can't kick a bot!")