User¶
discord_http.user module¶
- class discord_http.user.Application(*, state, data)¶
Bases:
PartialBaseRepresents a user client object.
- Parameters:
state (DiscordAPI)
data (dict)
- verified¶
- owner: PartialUser | None¶
The owner of the application, if any.
- guild: PartialGuild | None¶
The guild of the application, if the application is a game sold on Discord.
- primary_sku: PartialSKU | None¶
The primary SKU of the application, if the application is a game sold on Discord.
- flags: ApplicationFlags¶
The flags of the application.
- approximate_guild_count: int | None¶
The approximate number of guilds the application is in, if the application is a game sold on Discord.
- approximate_user_install_count: int | None¶
The approximate number of users that have the application installed, if the application is a game sold on Discord.
- approximate_user_authorization_count: int | None¶
The approximate number of users that have authorized the application, if the application is a game sold on Discord.
- role_connections_verification_url: str | None¶
The role connections verification URL of the application, if any.
- event_webhooks_status: ApplicationEventWebhookStatus¶
The event webhooks status of the application.
- class discord_http.user.AvatarDecoration(state, data)¶
Bases:
SnowflakeRepresents an avatar decoration of a user.
- Parameters:
state (DiscordAPI)
data (dict)
- asset¶
The asset of the avatar decoration.
- class discord_http.user.DisplayNameStyles(data)¶
Bases:
objectRepresents the display name style of a user.
- Parameters:
data (dict)
- font: DisplayNameFontType¶
The font of the display name, if any.
- effect: DisplayNameEffectType¶
The effect of the display name, if any.
- class discord_http.user.Nameplate(state, data)¶
Bases:
objectRepresents a nameplate collectible of a user.
- Parameters:
state (DiscordAPI)
data (dict)
- class discord_http.user.PartialUser(*, state, id)¶
Bases:
PartialBaseRepresents a partial user object.
- Parameters:
state (DiscordAPI)
id (int)
- async send(content=<MISSING>, *, channel_id=<MISSING>, embed=<MISSING>, embeds=<MISSING>, file=<MISSING>, files=<MISSING>, view=<MISSING>, tts=False, type=4, flags=<MISSING>, allowed_mentions=<MISSING>, delete_after=None) Message¶
Send a message to the user.
- Parameters:
channel_id (
int|None) – Channel ID to send the message to, if not provided, it will create a DM channeltts (
bool|None) – Whether the message should be sent as TTStype (
ResponseType|int) – Which type of response should be sentflags (
MessageFlags|None) – Flags of the messageallowed_mentions (
AllowedMentions|None) – Allowed mentions of the messagedelete_after (
float|None) – How long to wait before deleting the message
- Return type:
- Returns:
The message that was sent
- class discord_http.user.PrimaryGuild(state, data)¶
Bases:
objectRepresents a primary guild of a user.
This is commonly known as ‘clan’.
- Parameters:
state (DiscordAPI)
data (dict)
- guild() Guild | PartialGuild | None¶
Returns the guild object.
- Return type:
Guild|PartialGuild|None
- class discord_http.user.User(*, state, data)¶
Bases:
PartialUserRepresents a user object.
- Parameters:
state (DiscordAPI)
data (dict)
- primary_guild: PrimaryGuild | None¶
The primary guild of the user (aka. clan), if any.
- avatar_decoration: AvatarDecoration | None¶
The avatar decoration of the member, if available.
- display_name_styles: DisplayNameStyles | None¶
The display name style of the user, if any.
- property display_avatar_decoration: AvatarDecoration | None¶
An alias to merge with Member.display_avatar_decoration.
- property global_avatar_decoration: AvatarDecoration | None¶
Alias for User.avatar_decoration.
- async edit(*, username=<MISSING>, avatar=<MISSING>, banner=<MISSING>) User¶
Edit the user (only works for the current bot).
- async send(content=<MISSING>, *, channel_id=<MISSING>, embed=<MISSING>, embeds=<MISSING>, file=<MISSING>, files=<MISSING>, view=<MISSING>, tts=False, type=4, flags=<MISSING>, allowed_mentions=<MISSING>, delete_after=None) Message¶
Send a message to the user.
- Parameters:
channel_id (
int|None) – Channel ID to send the message to, if not provided, it will create a DM channeltts (
bool|None) – Whether the message should be sent as TTStype (
ResponseType|int) – Which type of response should be sentflags (
MessageFlags|None) – Flags of the messageallowed_mentions (
AllowedMentions|None) – Allowed mentions of the messagedelete_after (
float|None) – How long to wait before deleting the message
- Return type:
- Returns:
The message that was sent