Usuários e presenças¶
O guia de modelos explica como os modelos são tipados e decodificados. Toda classe daqui pode ser importada de bostie.
bostie.models.user
¶
PartialUser
¶
Nameplate
¶
PrimaryGuild
¶
DisplayNameStyles
¶
User
¶
Bases: PartialUser
A Discord user or bot account.
avatar_decoration_data
class-attribute
instance-attribute
¶
avatar_decoration_data: AvatarDecorationData | None = None
display_name_styles
class-attribute
instance-attribute
¶
display_name_styles: DisplayNameStyles | None = None
CurrentUser
¶
Bases: User
The bot's own user, with the fields only the account's owner sees.
raw_json
class-attribute
instance-attribute
¶
raw_json: bytes | None = msgspec.field(default=None, name='__bostie_raw__')
avatar_decoration_data
class-attribute
instance-attribute
¶
avatar_decoration_data: AvatarDecorationData | None = None
display_name_styles
class-attribute
instance-attribute
¶
display_name_styles: DisplayNameStyles | None = None
bostie.models.presence
¶
PresenceUser
¶
ClientStatus
¶
ActivityTimestamps
¶
ActivityEmoji
¶
ActivityParty
¶
ActivityAssets
¶
ActivitySecrets
¶
Activity
¶
Bases: Model
An activity; created_at is in unix milliseconds and buttons holds labels.
status_display_type
class-attribute
instance-attribute
¶
status_display_type: StatusDisplayType | None = None
bostie.models.oauth2
¶
AccessToken
¶
Bases: Model
An OAuth2 access token; scope lists the granted scopes, space-separated.
A code grant with the bot scope also returns the guild the bot joined, and
one with webhook.incoming the webhook it created.
Authorization
¶
Connection
¶
bostie.models.webhook
¶
WebhookSourceGuild
¶
WebhookSourceChannel
¶
Webhook
¶
Bases: Model, Snowflake
A webhook; token and url only come with incoming webhooks.
source_channel
class-attribute
instance-attribute
¶
source_channel: WebhookSourceChannel | None = None