Skip to content

User

User (BaseDiscordObject)

Discord User.

Attributes:

Name Type Description
id Snowflake

Unique ID of User. Is a Snowflake.

username str

Global name of the User.

discriminator int

Random set of 4 numbers to discriminate user from others.

avatar str

TODO: Look this up.

bot bool

User is a bot or not.

mention property readonly

Generate a valid name mention for use in Discord.

mention_nickname property readonly

Generate a valid nickname mention for use in Discord.

PremiumType (IntFlag)

Type of Premium subscription the User has.

UserFlag (IntFlag)

Flags on a User.

to_dict(self) inherited

Convert object to dictionary suitable for API or other generic useage.

__str__(self) special

Return a discord compatible mention string.

validate(self) inherited

Check for valid object type.

Exceptions:

Type Description
NotImplementedError

Always.

__repr__(self) special

Return a discord compatible mention string.

__eq__(self, other) special

Determine if other User and self are the same User.

from_dict(self, data)

Parse a User from an API compliant dict.

Member (User)

User within a guild.

mention inherited property readonly

Generate a valid name mention for use in Discord.

mention_nickname inherited property readonly

Generate a valid nickname mention for use in Discord.

PremiumType (IntFlag) inherited

Type of Premium subscription the User has.

UserFlag (IntFlag) inherited

Flags on a User.

to_dict(self) inherited

Convert object to dictionary suitable for API or other generic useage.

validate(self) inherited

Check for valid object type.

Exceptions:

Type Description
NotImplementedError

Always.

from_dict(self, data)

Parse a Member from an API compliant dict.

update_from_user(self, user)

Update Member properties from associated user.