I want to make a program that will get the user id of a username you enter. Here is what I have so far:
from discord.ext import commands
client = commands.Bot(description="a", command_prefix=".", self_bot = False)
client.remove_command('help')
@client.event
async def on_ready():
user = await client.fetch_user("pirace#4637")
print(user)
client.run('token')
It gives me this error:
400 Bad Request (error code: 50035): Invalid Form Body
In user_id: Value "pirace#4637" is not snowflake.
Does anyone know how I would do this?