User¶
discord_http.user module¶
- class discord_http.user.AvatarDecoration(state, data)¶
Bases:
Snowflake
Represents an avatar decoration of a user.
- Parameters:
state (DiscordAPI)
data (dict)
- class discord_http.user.Nameplate(state, data)¶
Bases:
object
Represents a nameplate collectible of a user.
- Parameters:
state (DiscordAPI)
data (dict)
- class discord_http.user.PartialUser(*, state, id)¶
Bases:
PartialBase
- 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:
object
Represents 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:
PartialUser
Represents a user object.
- Parameters:
state (DiscordAPI)
data (dict)
- avatar_decoration¶
The avatar decoration of the member, if available.
- Type:
AvatarDecoration | None
- primary_guild¶
The primary guild of the user (aka. clan), if any
- Type:
PrimaryGuild | None
- 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.
- class discord_http.user.UserClient(*, state, data)¶
Bases:
User
Represents a user client object.
- Parameters:
state (DiscordAPI)
data (dict)
- async edit(*, username=<MISSING>, avatar=<MISSING>, banner=<MISSING>) UserClient ¶
Edit the user.