check userid discord py code example
Example 1: discord py get user by id
user = bot.get_user(user_id)
Example 2: 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!")