Skip to content

Users

Methods

Get current user

Fetch information about the currently to the Discord client connected user account.
Note: This doesn’t return the proper values when the game is not fully connected to the Discord client. Give it its time!

DiscordRPC.get_current_user()

Returns Dictionary current_user

KeyTypeDescription
"avatar"StringThe avatar hash of the Discord user
"is_bot"boolIf the user is a bot (when does this happen?)
"discriminator"intThe “#1234” number after the name from a user
"id"intThe user’s unique ID
"username"StringThe Discord username (without discriminator)
"avatar_url"String
The url of the user’s avataralso returns the correct url for the default avatar.
When avatar is empty a url will be generated out of discriminator % 5. The user avatars are 512x512px and the default avatars 256x256px