Home > front end >  Ho to get exactly id from ping discord py
Ho to get exactly id from ping discord py

Time:07-14

I want to create a command using id from pinged user and the return id like that : <@696986678887317556> and i want it : 696986678887317556, so i have coding this :

@bot.command()
@commands.has_permissions(administrator=True)
async def autp(ctx, name):
    print(name)
    name = str(name)
    nachar = ["@", "<", ">"]
    for x in nachar:
        id = name.replace(x, '')
    print(id)

And the result are this : <@696986678887317556 how i can code it pls

  • Related