Answers for "check userid discord py"

7

discord py get user by id

user = bot.get_user(user_id)
Posted by: Guest on May-21-2020
-1

discord.py check if user is bot

@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!")
Posted by: Guest on March-31-2021

Python Answers by Framework

Browse Popular Code Answers by Language