[Python] How do I get someones specific discord ID

Discussão em 'Python' iniciado por Stack, Abril 2, 2025.

  1. Stack

    Stack Membro Participativo

    Im using pycord to build a discord bot. I am trying to make it so if the user that is being banned equals a specific discord ID. It will print, "Can not perform this action." What have I missed and what can I do to get someones specific discord ID?


    @bot.command(description="Bans a user from the server")
    async def ban(ctx, member : discord.Member, *, reason = None):
    await member.ban(reason = reason)
    user = client.get_member()
    if member == user
    print("Can not ban user")



    I have tried looking through multiple forums and the pycord documentation but cant find anything to help me.

    Continue reading...

Compartilhe esta Página