Melisa Models User#
User#
UserFlags#
- class UserFlags[source]#
Bases:
IntEnumProfile Icons
- NONE#
None
- STAFF#
Discord Employee
- PARTNER#
Partnered Server Owner
- HYPESQUAD#
HypeSquad Events Coordinator
- BUG_HUNTER_LEVEL_1#
Bug Hunter Level 1
- HYPESQUAD_ONLINE_HOUSE_1#
House Bravery Member
- HYPESQUAD_ONLINE_HOUSE_2#
House Brilliance Member
- HYPESQUAD_ONLINE_HOUSE_3#
House Balance Member
- PREMIUM_EARLY_SUPPORTER#
Early Nitro Supporter
- TEAM_PSEUDO_USER#
User is a team
- BUG_HUNTER_LEVEL_2#
Bug Hunter Level 2
- VERIFIED_BOT#
Verified Bot
- VERIFIED_DEVELOPER#
Early Verified Bot Developer
- CERTIFIED_MODERATOR#
Discord Certified Moderator
- BOT_HTTP_INTERACTIONS#
Bot uses only HTTP interactions and is shown in the online member list
VisibilityTypes#
User#
- clsUser.from_dict
- defavatar_url
- defdefault_avatar_url
- defto_dict
- class User[source]#
Bases:
APIModelBaseUser Structure
- id#
the user’s id
- Type:
Snowflake
- username#
the user’s username, not unique across the platform
- Type:
str
- discriminator#
the user’s 4-digit discord-tag
- Type:
int
- avatar#
the user’s avatar hash
- Type:
Optional[
str]
- bot#
whether the user belongs to an OAuth2 application
- Type:
APINullable[
bool]
- system#
whether the user is an Official Discord System user (part of the urgent message system)
- Type:
APINullable[
bool]
- mfa_enabled#
whether the user has two factor enabled on their account
- Type:
APINullable[
bool]
- banner#
the user’s banner hash
- Type:
APINullable[
str]
- accent_color#
the user’s banner color encoded as an integer representation of hexadecimal color code
- Type:
APINullable[
int]
- locale#
the user’s chosen language option
- Type:
APINullable[
str]
- verified#
whether the email on this account has been verified
- Type:
APINullable[
bool]
- email#
the user’s email
- Type:
APINullable[
str]
- flags#
the flags on a user’s account
- Type:
APINullable[
UserFlags]
the type of Nitro subscription on a user’s account
- Type:
APINullable[
int]
- public_flags#
the public flags on a user’s account
- Type:
APINullable[
int]
The user their premium type in a usable enum.
- Type:
APINullable[
PremiumTypes]
- classmethod from_dict(data)[source]#
Generate a user from the given data.
- Parameters:
data (
dict) – The dictionary to convert into a user.
- property mention#
The user’s mention string. (<@id>)
- Type:
str
- to_dict()#
Transform the current object to a dictionary representation. Parameters that start with an underscore are not serialized.