Enums and Flag Classes¶
The following section documents everything related to enums and flags.
Enumerations¶
The API provides some enumerations for certain types of strings to avoid the API from being stringly typed in case the strings change in the future.
All enumerations are subclasses of a custom class which mimics the behavior
of enum.Enum.
Enum¶
Authentication¶
Asset¶
- class stoat.AssetMetadataType[source]¶
Specifies the metadata type of asset.
- file¶
The file is just a generic uncategorized file.
- text¶
The file contains textual data and should be displayed as such.
- image¶
The file is an image with specific dimensions.
- video¶
The file is a video with specific dimensions.
- audio¶
The file is audio.
Channel¶
- class stoat.ChannelType[source]¶
Specifies the type of a channel.
- saved_messages¶
A channel accessible only to one user.
- private¶
A private text channel. Also called a direct message.
- group¶
A private group text channel.
- text¶
A text channel.
- voice¶
A voice channel.
- unknown¶
The channel type is unknown.
Discover¶
Embeds¶
- class stoat.BandcampContentType[source]¶
Specifies type of remote Bandcamp content.
- album¶
A Bandcamp album.
- track¶
A Bandcamp track.
- class stoat.ImageSize[source]¶
Specifies image positioning and size.
- large¶
Show large preview at the bottom of the embed.
- preview¶
Show small preview to the side of the embed.
Messages¶
OAuth2¶
- class stoat.OAuth2ResponseType[source]¶
Specifies what
codequerystring parameter in resulting OAuth2 redirect URL will contain.Added in version 1.2.
- code¶
The parameter will contain code that should be exchanged.
- token¶
The parameter will contain OAuth2 token.
- class stoat.OAuth2GrantType[source]¶
Specifies the grant type of OAuth2 flow.
Added in version 1.2.
- authorization_code¶
The client will have to ask server to exchange code.
- implicit¶
The client will receive OAuth2 token directly.
- class stoat.OAuth2CodeChallengeMethod[source]¶
Specifies the method of generating OAuth2 code challenge.
Added in version 1.2.
- plain¶
The code challenge will be provided as-is.
- class stoat.OAuth2Scope[source]¶
Specifies the scope(s) of OAuth2 token.
Added in version 1.2.
- identify¶
The token can be used to
retrieve user's information and friends.
- servers¶
The token can be used to
retrieve user's servers.
- upload_files¶
The token can be used to upload files.
- events¶
The token can be used to connect to Gateway on user’s behalf.
- full¶
The token can be used to access entire Stoat HTTP API.
Reporting¶
- class stoat.ContentReportReason[source]¶
Specifies reason for reporting message or a server.
- none¶
No reason has been specified.
- illegal¶
Illegal content catch-all reason.
- illegal_goods¶
Server or user is selling or facilitating use of drugs or other illegal goods.
- illegal_extortion¶
Extortion or blackmail.
- illegal_pornography¶
Revenge or child pornography.
- illegal_hacking¶
Illegal hacking activity.
- extreme_violence¶
Extreme violence, gore, or animal cruelty, with exception to violence potrayed in media / creative arts.
- promotes_harm¶
Content that promotes harm to others / self.
- unsolicited_spam¶
Unsolicited advertisements.
- raid¶
Server or user is raiding.
- spam_abuse¶
Server or user is spamming or doing other sort of platform abuse.
- scams_fraud¶
Server is scamming or doing fraud.
- malware¶
Server or user is distributing malware or malicious links.
- harassment¶
Harassment or abuse targeted at another user.
Servers¶
Settings¶
- class stoat.Language[source]¶
Specifies language.
- english¶
English (Traditional)
- english_simplified¶
English (Simplified)
- arabic¶
عربي
- assamese¶
অসমীয়া
- azerbaijani¶
Azərbaycan dili
- belarusian¶
Беларуская
- bulgarian¶
Български
- bengali¶
বাংলা
- breton¶
Brezhoneg
- catalonian¶
Català
- cebuano¶
Bisaya
- central_kurdish¶
کوردی
- czech¶
Čeština
- danish¶
Dansk
- german¶
Deutsch
- greek¶
Ελληνικά
- spanish¶
Español
- spanish_latin_america¶
Español (América Latina)
- estonian¶
eesti
- finnish¶
suomi
- filipino¶
Filipino
- french¶
Français
- irish¶
Gaeilge
- hindi¶
हिन्दी
- croatian¶
Hrvatski
- hungarian¶
Magyar
- armenian¶
հայերեն
- indonesian¶
Bahasa Indonesia
- icelandic¶
Íslenska
- italian¶
Italiano
- japense¶
日本語
- korean¶
한국어
- luxembourgish¶
Lëtzebuergesch
- lithuanian¶
Lietuvių
- latvian¶
Latviešu
- macedonian¶
Македонски
- malay¶
Bahasa Melayu
- norwegian_bokmal¶
Norsk bokmål
- dutch¶
Nederlands
- persian¶
فارسی
- polish¶
Polski
- portuguese_brazil¶
Português (do Brasil)
- portuguese_portugal¶
Português (Portugal)
- romanian¶
Română
- russian¶
Русский
- slovak¶
Slovensky
- slovenian¶
Slovenščina
- albanian¶
Shqip
- serbian¶
Српски
- sinhalese¶
සිංහල
- swedish¶
Svenska
- tamil¶
தமிழ்
- thai¶
ไทย
- turkish¶
Türkçe
- urdu¶
اردو
- ukrainian¶
Українська
- venetian¶
Vèneto
- vietnamese¶
Tiếng Việt
- chinese_simplified¶
简体中文
- chinese_traditional¶
繁體中文
- tokipona¶
Toki Pona
- esperanto¶
Esperanto
- owo¶
OwO
Note
This is joke language.
- pirate¶
Pirate
Note
This is joke language.
- bottom¶
Bottom
Note
This is joke language.
- leet¶
1337
Note
This is joke language.
- piglatin¶
Pig Latin
Note
This is joke language.
- enchantment_table¶
Enchantment Table
Note
This is joke language.
- class stoat.AndroidTheme[source]¶
Specifies client theme for Stoat Android.
- revolt¶
Use legacy colors (used prior to rebranding).
- light¶
Represents the Light theme on Stoat Android.
- pure_black¶
Represents the AMOLED theme on Stoat Android.
- system¶
Use system theme.
- material_you¶
Represents the Material You theme on Stoat Android.
- stoat¶
Use Stoat colors.
- class stoat.AndroidFont[source]¶
Specifies the font to use across UI for Stoat Android app.
- default¶
Use default font.
- google_sans_flex¶
Use Google Sans Flex font.
- class stoat.AndroidProfilePictureShape[source]¶
Specifies rounding grade for profile pictures, including in chat and profiles. This applies to all users on Stoat Android.
- sharp¶
Use sharp rounding grade for profile pictures.
- rounded¶
Use rounded grade for profile pictures.
- circular¶
Use circular rounding grade for profile pictures.
- class stoat.AndroidMessageReplyStyle[source]¶
Specifies a way to quickly reply on Stoat Android.
- long_press_to_reply¶
Long press message to reply.
- swipe_to_reply¶
Swipe from message end to reply.
- double_tap_to_reply¶
Tap twice a message to reply.
- class stoat.ReviteChangelogEntry[source]¶
Represents a Revite changelog entry.
More details about entries may be found here.
- mfa_feature¶
Represents a changelog entry about securing accounts with MFA.
- iar_reporting_feature¶
Represents a changelog entry about in-app reporting messages, servers and users.
- discriminators_feature¶
Represents a changelog entry about adding discriminators.
- property created_at¶
When the changelog entry was created.
- property title¶
The changelog entries’ title.
- class stoat.ReviteNotificationState[source]¶
Specifies the notification’s state.
- all_messages¶
You’re always notified unless you’re busy.
- mentions_only¶
You’re only notified on mentions unless you’re busy.
- muted¶
The channel/server is muted.
- class stoat.ReviteEmojiPack[source]¶
Specifies the emoji pack to render.
- mutant_remix¶
Use ‘Mutant Remix’ emoji pack.
- twemoji¶
Use ‘Twemoji’ emoji pack.
- openmoji¶
Use ‘Openmoji’ emoji pack.
- noto_emoji¶
Use ‘Noto Emoji’ emoji pack.
- class stoat.ReviteBaseTheme[source]¶
Represents the Revite client theme.
- light¶
Represents the Light theme on Stoat.
- dark¶
Represents the Dark theme on Stoat.
- class stoat.ReviteFont[source]¶
Specifies the font in Revite client.
- open_sans¶
Represents ‘Open Sans’ font.
- opendyslexic¶
Represents ‘OpenDyslexic’ font.
- inter¶
Represents ‘Inter’ font.
Note
This font supports ligatures.
- atkinson_hyperlegible¶
Represents ‘Atkinson Hyperlegible’ font.
- roboto¶
Represents ‘Roboto’ font.
- noto_sans¶
Represents ‘Noto Sans’ font.
- lato¶
Represents ‘Lato’ font.
- bitter¶
Represents ‘Bitter’ font.
- montserrat¶
Represents ‘Montserrat’ font.
- poppins¶
Represents ‘Poppins’ font.
- raleway¶
Represents ‘Raleway’ font.
- ubuntu¶
Represents ‘Ubuntu’ font.
- comic_neue¶
Represents ‘Comic Neue’ font.
- lexend¶
Represents ‘Lexend’ font.
- class stoat.ReviteMonoFont[source]¶
Specifies the font inside codeblocks in Revite client.
- fira_code¶
Represents ‘Fira Code’ mont.
- roboto_mono¶
Represents ‘Roboto Mono’ mont.
- source_code_pro¶
Represents ‘Source Code Pro’ mont.
- space_mono¶
Represents ‘Space Mono’ mont.
- ubuntu_mono¶
Represents ‘Ubuntu Mono’ mont.
- jetbrains_mono¶
Represents ‘JetBrains Mono’ mont.
Users¶
- class stoat.Presence[source]¶
Specifies the presence of an user.
- online¶
The user is online.
- idle¶
The user is currently not available.
- focus¶
The user is focusing and will only receive mentions.
- busy¶
The user is busy and will not receive any notifications.
- invisible¶
- The user appears to be offline to other users.
- class stoat.RelationshipStatus[source]¶
Specifies the relationship of current user and another user (or themselves).
- none¶
No relationship.
- user¶
This user is you.
- friend¶
This user is friends with you.
- outgoing¶
You sent friend request to this user.
- incoming¶
This user sent friend request to you.
- blocked¶
You blocked this user.
- blocked_other¶
This user blocked you.
- class stoat.UserReportReason[source]¶
Specifies reason for user report.
- none¶
No reason has been specified.
- unsolicited_spam¶
User is sending unsolicited advertisements.
- spam_abuse¶
User is sending spam or abusing the platform.
- inappropriate_profile¶
User’s profile contains inappropriate content for a general audience.
- impersonation¶
User is impersonating another user.
- ban_evasion¶
User is evading a ban.
- underage¶
User is not of minimum age to use the platform.
Flag Classes¶
BaseFlags¶
- cls BaseFlags.all
- cls BaseFlags.none
- def copy
- def is_strict_subset
- def is_strict_superset
- def is_subset
- def is_superset
BotFlags¶
- cls BotFlags.all
- cls BotFlags.none
- def copy
- def is_strict_subset
- def is_strict_superset
- def is_subset
- def is_superset
- class stoat.BotFlags(value=0, /)[source]¶
Wraps up a Stoat Bot flag value.
- x == y
Checks if two flags are equal.
- x != y
Checks if two flags are not equal.
- x | y, x |= y
Returns a BotFlags instance with all enabled flags from both x and y.
- x & y, x &= y
Returns a BotFlags instance with only flags enabled on both x and y.
- x ^ y, x ^= y
Returns a BotFlags instance with only flags enabled on only one of x or y, not on both.
- ~x
Returns a BotFlags instance with all flags inverted from x.
- hash(x)
Return the flag’s hash.
- iter(x)
Returns an iterator of
(name, value)pairs. This allows it to be, for example, constructed as a dict or a list of pairs.
- bool(b)
Returns whether any flag is set to
True.
- value¶
The raw value. This value is a bit array field of a 53-bit integer representing the currently available flags. You should query flags via the properties rather than using this raw value.
- Type:
- is_strict_subset(other, /)[source]¶
bool: ReturnsTrueif the flags on other are a strict subset of those on self.
MessageFlags¶
- cls MessageFlags.all
- cls MessageFlags.none
- def copy
- def is_strict_subset
- def is_strict_superset
- def is_subset
- def is_superset
- class stoat.MessageFlags(value=0, /)[source]¶
Wraps up a Message flag value.
- x == y
Checks if two flags are equal.
- x != y
Checks if two flags are not equal.
- x | y, x |= y
Returns a MessageFlags instance with all enabled flags from both x and y.
- x & y, x &= y
Returns a MessageFlags instance with only flags enabled on both x and y.
- x ^ y, x ^= y
Returns a MessageFlags instance with only flags enabled on only one of x or y, not on both.
- ~x
Returns a MessageFlags instance with all flags inverted from x.
- hash(x)
Return the flag’s hash.
- iter(x)
Returns an iterator of
(name, value)pairs. This allows it to be, for example, constructed as a dict or a list of pairs.
- bool(b)
Returns whether any flag is set to
True.
- value¶
The raw value. This value is a bit array field of a 53-bit integer representing the currently available flags. You should query flags via the properties rather than using this raw value.
- Type:
- mention_online¶
Whether the message will mention all users who are online and can see the channel.
Note
If this is
True, thenmention_everyonecannot beTrueeither.- Type:
- is_strict_subset(other, /)[source]¶
bool: ReturnsTrueif the flags on other are a strict subset of those on self.
Permissions¶
- assign_roles
- ban_members
- change_avatar
- change_nickname
- connect
- create_invites
- deafen_members
- kick_members
- listen
- manage_channels
- manage_customization
- manage_messages
- manage_nicknames
- manage_permissions
- manage_roles
- manage_server
- manage_webhooks
- mention_everyone
- mention_roles
- move_members
- mute_members
- react
- read_message_history
- remove_avatars
- send_embeds
- send_messages
- speak
- timeout_members
- upload_files
- use_masquerade
- value
- video
- view_channel
- cls Permissions.all
- cls Permissions.channel
- cls Permissions.generic
- cls Permissions.member
- cls Permissions.none
- cls Permissions.voice
- def copy
- def is_strict_subset
- def is_strict_superset
- def is_subset
- def is_superset
- class stoat.Permissions(value=0, /, **kwargs)[source]¶
Wraps up a Permission flag value.
- x == y
Checks if two flags are equal.
- x != y
Checks if two flags are not equal.
- x | y, x |= y
Returns a Permissions instance with all enabled flags from both x and y.
- x & y, x &= y
Returns a Permissions instance with only flags enabled on both x and y.
- x ^ y, x ^= y
Returns a Permissions instance with only flags enabled on only one of x or y, not on both.
- ~x
Returns a Permissions instance with all flags inverted from x.
- hash(x)
Return the flag’s hash.
- iter(x)
Returns an iterator of
(name, value)pairs. This allows it to be, for example, constructed as a dict or a list of pairs.
- bool(b)
Returns whether any flag is set to
True.
- value¶
The raw value. This value is a bit array field of a 53-bit integer representing the currently available flags. You should query flags via the properties rather than using this raw value.
- Type:
- manage_channels¶
Whether the user can edit, delete, or create channels in the server.
This also corresponds to the “Manage Channel” channel-specific override.
- Type:
- classmethod generic()[source]¶
Permissions: Returns generic permissions.
- manage_nicknames¶
Whether the user can change or remove other’s nicknames below their ranking.
- Type:
- classmethod member()[source]¶
Permissions: Returns member-related permissions.
- manage_messages¶
Whether the user can delete other’s messages (or pin them) in a channel.
- Type:
- use_masquerade¶
Whether the user can use masquerade on own messages with custom nickname and avatar.
- Type:
- classmethod channel()[source]¶
Permissions: Returns channel-related permissions.
- deafen_members¶
Whether user can deafen other members with lower ranking in a voice call.
- Type:
- classmethod voice()[source]¶
Permissions: Returns voice-related permissions.
- is_strict_subset(other, /)[source]¶
bool: ReturnsTrueif the flags on other are a strict subset of those on self.
- stoat.ALLOW_PERMISSIONS_IN_TIMEOUT¶
The permissions that are only allowed when user is timed out.
- stoat.VIEW_ONLY_PERMISSIONS¶
The permissions that are allowed when user can view channel.
- stoat.DEFAULT_PERMISSIONS¶
The default permissions.
- stoat.DEFAULT_SAVED_MESSAGES_PERMISSIONS¶
The default permissions in
SavedMessagesChannel.
UserPermissions¶
- cls UserPermissions.all
- cls UserPermissions.none
- def copy
- def is_strict_subset
- def is_strict_superset
- def is_subset
- def is_superset
- class stoat.UserPermissions(value=0, /, **kwargs)[source]¶
Wraps up an user permission flag value.
- x == y
Checks if two flags are equal.
- x != y
Checks if two flags are not equal.
- x | y, x |= y
Returns a UserPermissions instance with all enabled flags from both x and y.
- x & y, x &= y
Returns a UserPermissions instance with only flags enabled on both x and y.
- x ^ y, x ^= y
Returns a UserPermissions instance with only flags enabled on only one of x or y, not on both.
- ~x
Returns a UserPermissions instance with all flags inverted from x.
- hash(x)
Return the flag’s hash.
- iter(x)
Returns an iterator of
(name, value)pairs. This allows it to be, for example, constructed as a dict or a list of pairs.
- bool(b)
Returns whether any flag is set to
True.
- value¶
The raw value. This value is a bit array field of a 53-bit integer representing the currently available flags. You should query flags via the properties rather than using this raw value.
- Type:
- is_strict_subset(other, /)[source]¶
bool: ReturnsTrueif the flags on other are a strict subset of those on self.
ServerFlags¶
- cls ServerFlags.all
- cls ServerFlags.none
- def copy
- def is_strict_subset
- def is_strict_superset
- def is_subset
- def is_superset
- class stoat.ServerFlags(value=0, /, **kwargs)[source]¶
Wraps up a server flag value.
- x == y
Checks if two flags are equal.
- x != y
Checks if two flags are not equal.
- x | y, x |= y
Returns a ServerFlags instance with all enabled flags from both x and y.
- x & y, x &= y
Returns a ServerFlags instance with only flags enabled on both x and y.
- x ^ y, x ^= y
Returns a ServerFlags instance with only flags enabled on only one of x or y, not on both.
- ~x
Returns a ServerFlags instance with all flags inverted from x.
- hash(x)
Return the flag’s hash.
- iter(x)
Returns an iterator of
(name, value)pairs. This allows it to be, for example, constructed as a dict or a list of pairs.
- bool(b)
Returns whether any flag is set to
True.
- value¶
The raw value. This value is a bit array field of a 53-bit integer representing the currently available flags. You should query flags via the properties rather than using this raw value.
- Type:
- is_strict_subset(other, /)[source]¶
bool: ReturnsTrueif the flags on other are a strict subset of those on self.
UserBadges¶
- cls UserBadges.all
- cls UserBadges.none
- def copy
- def is_strict_subset
- def is_strict_superset
- def is_subset
- def is_superset
- class stoat.UserBadges(value=0, /, **kwargs)[source]¶
Wraps up an user badges flag value.
- x == y
Checks if two flags are equal.
- x != y
Checks if two flags are not equal.
- x | y, x |= y
Returns a UserBadges instance with all enabled flags from both x and y.
- x & y, x &= y
Returns a UserBadges instance with only flags enabled on both x and y.
- x ^ y, x ^= y
Returns a UserBadges instance with only flags enabled on only one of x or y, not on both.
- ~x
Returns a UserBadges instance with all flags inverted from x.
- hash(x)
Return the flag’s hash.
- iter(x)
Returns an iterator of
(name, value)pairs. This allows it to be, for example, constructed as a dict or a list of pairs.
- bool(b)
Returns whether any flag is set to
True.
- value¶
The raw value. This value is a bit array field of a 53-bit integer representing the currently available flags. You should query flags via the properties rather than using this raw value.
- Type:
- reserved_relevant_joke_badge_1¶
Whether the user is have given some funny joke.
This is displayed as amogus (with ‘sus’ label) in Revite.
- Type:
- reserved_relevant_joke_badge_2¶
Whether the user is have given some funny joke.
This is displayed as amorbus (Amogus with Morbin texture) in Revite, and as ‘Low resolution troll face’ in new client.
- Type:
- is_strict_subset(other, /)[source]¶
bool: ReturnsTrueif the flags on other are a strict subset of those on self.
UserFlags¶
- cls UserFlags.all
- cls UserFlags.none
- def copy
- def is_strict_subset
- def is_strict_superset
- def is_subset
- def is_superset
- class stoat.UserFlags(value=0, /, **kwargs)[source]¶
Wraps up an user flags flag value.
- x == y
Checks if two flags are equal.
- x != y
Checks if two flags are not equal.
- x | y, x |= y
Returns a UserFlags instance with all enabled flags from both x and y.
- x & y, x &= y
Returns a UserFlags instance with only flags enabled on both x and y.
- x ^ y, x ^= y
Returns a UserFlags instance with only flags enabled on only one of x or y, not on both.
- ~x
Returns a UserFlags instance with all flags inverted from x.
- hash(x)
Return the flag’s hash.
- iter(x)
Returns an iterator of
(name, value)pairs. This allows it to be, for example, constructed as a dict or a list of pairs.
- bool(b)
Returns whether any flag is set to
True.
- value¶
The raw value. This value is a bit array field of a 53-bit integer representing the currently available flags. You should query flags via the properties rather than using this raw value.
- Type:
- is_strict_subset(other, /)[source]¶
bool: ReturnsTrueif the flags on other are a strict subset of those on self.