서식, 색상, CDN 등¶
bostie.fmt
¶
timestamp
¶
timestamp(when: datetime | float, style: TimestampStyle | None = None) -> str
A time each reader sees in their own time zone and language.
command
¶
A clickable slash command; name may hold a group and subcommand.
guild_navigation
¶
guild_navigation(kind: GuildNavigation, role_id: int | None = None) -> str
A link to a tab of the server; role_id opens one linked role.
store
¶
A link to the app's store page, or one SKU; chat shows it as a card.
escape_markdown
¶
The text shown as typed, with links left working.
remove_markdown
¶
The text without markdown, with links left working.
escape_mentions
¶
The text with @everyone, @here and user and role mentions that cannot ping.
bostie.color
¶
bostie.cdn
¶
emoji
¶
emoji(emoji_id: int, *, animated: bool = False, size: int | None = None, format: ImageFormat = 'webp') -> str
guild_icon
¶
guild_icon(guild_id: int, icon: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
guild_splash
¶
guild_splash(guild_id: int, splash: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
guild_discovery_splash
¶
guild_discovery_splash(guild_id: int, splash: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
guild_banner
¶
guild_banner(guild_id: int, banner: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
user_banner
¶
user_banner(user_id: int, banner: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
default_avatar
¶
The avatar of a user who has not set one; bots pass their discriminator.
user_avatar
¶
user_avatar(user_id: int, avatar: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
display_avatar
¶
display_avatar(user: PartialUser, *, size: int | None = None, format: ImageFormat = 'webp') -> str
The user's avatar, or the default one when they have not set any.
member_avatar
¶
member_avatar(guild_id: int, user_id: int, avatar: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
member_banner
¶
member_banner(guild_id: int, user_id: int, banner: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
application_icon
¶
application_icon(application_id: int, icon: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
application_cover
¶
application_cover(application_id: int, cover_image: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
application_asset
¶
application_asset(application_id: int, asset_id: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
store_page_asset
¶
store_page_asset(application_id: int, asset_id: int, *, size: int | None = None, format: ImageFormat = 'webp') -> str
sticker_pack_banner
¶
sticker_pack_banner(banner_asset_id: int, *, size: int | None = None, format: ImageFormat = 'webp') -> str
team_icon
¶
team_icon(team_id: int, icon: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
sticker
¶
sticker(sticker_id: int, format_type: StickerFormatType) -> str
A PNG, Lottie JSON or GIF, as the sticker's format type says.
role_icon
¶
role_icon(role_id: int, icon: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
scheduled_event_cover
¶
scheduled_event_cover(event_id: int, image: str, *, size: int | None = None, format: ImageFormat = 'webp') -> str
bostie.activity
¶
bostie.oauth2
¶
authorize_url
¶
authorize_url(client_id: int, *, scopes: Iterable[OAuth2Scope | str], redirect_uri: str | None = None, state: str | None = None, prompt: Literal['consent', 'none'] | None = None, integration_type: ApplicationIntegrationType | None = None, code_challenge: str | None = None) -> str
The code grant URL for scopes; code_challenge is an S256 PKCE challenge.
invite_url
¶
invite_url(client_id: int, *, permissions: Permissions | None = None, scopes: Iterable[OAuth2Scope | str] | None = None, integration_type: ApplicationIntegrationType | None = None, guild_id: int | None = None, disable_guild_select: bool | None = None) -> str
The URL that installs the app; its Developer Portal settings fill in the rest.
bostie.permissions
¶
TEXT
module-attribute
¶
TEXT = Permissions.CREATE_INSTANT_INVITE | Permissions.MANAGE_CHANNELS | Permissions.ADD_REACTIONS | Permissions.VIEW_CHANNEL | Permissions.SEND_MESSAGES | Permissions.SEND_TTS_MESSAGES | Permissions.MANAGE_MESSAGES | Permissions.EMBED_LINKS | Permissions.ATTACH_FILES | Permissions.READ_MESSAGE_HISTORY | Permissions.MENTION_EVERYONE | Permissions.USE_EXTERNAL_EMOJIS | Permissions.MANAGE_ROLES | Permissions.MANAGE_WEBHOOKS | Permissions.USE_APPLICATION_COMMANDS | Permissions.MANAGE_THREADS | Permissions.CREATE_PUBLIC_THREADS | Permissions.CREATE_PRIVATE_THREADS | Permissions.USE_EXTERNAL_STICKERS | Permissions.SEND_MESSAGES_IN_THREADS | Permissions.USE_EMBEDDED_ACTIVITIES | Permissions.SEND_VOICE_MESSAGES | Permissions.SEND_POLLS | Permissions.USE_EXTERNAL_APPS | Permissions.PIN_MESSAGES | Permissions.BYPASS_SLOWMODE
VOICE
module-attribute
¶
VOICE = Permissions.CREATE_INSTANT_INVITE | Permissions.MANAGE_CHANNELS | Permissions.ADD_REACTIONS | Permissions.PRIORITY_SPEAKER | Permissions.STREAM | Permissions.VIEW_CHANNEL | Permissions.SEND_MESSAGES | Permissions.SEND_TTS_MESSAGES | Permissions.MANAGE_MESSAGES | Permissions.EMBED_LINKS | Permissions.ATTACH_FILES | Permissions.READ_MESSAGE_HISTORY | Permissions.MENTION_EVERYONE | Permissions.USE_EXTERNAL_EMOJIS | Permissions.CONNECT | Permissions.SPEAK | Permissions.MUTE_MEMBERS | Permissions.DEAFEN_MEMBERS | Permissions.MOVE_MEMBERS | Permissions.USE_VAD | Permissions.MANAGE_ROLES | Permissions.MANAGE_WEBHOOKS | Permissions.USE_APPLICATION_COMMANDS | Permissions.MANAGE_EVENTS | Permissions.USE_EXTERNAL_STICKERS | Permissions.USE_EMBEDDED_ACTIVITIES | Permissions.USE_SOUNDBOARD | Permissions.CREATE_EVENTS | Permissions.USE_EXTERNAL_SOUNDS | Permissions.SEND_VOICE_MESSAGES | Permissions.SET_VOICE_CHANNEL_STATUS | Permissions.SEND_POLLS | Permissions.USE_EXTERNAL_APPS | Permissions.BYPASS_SLOWMODE
STAGE
module-attribute
¶
STAGE = Permissions.CREATE_INSTANT_INVITE | Permissions.MANAGE_CHANNELS | Permissions.ADD_REACTIONS | Permissions.STREAM | Permissions.VIEW_CHANNEL | Permissions.SEND_MESSAGES | Permissions.SEND_TTS_MESSAGES | Permissions.MANAGE_MESSAGES | Permissions.EMBED_LINKS | Permissions.ATTACH_FILES | Permissions.READ_MESSAGE_HISTORY | Permissions.MENTION_EVERYONE | Permissions.USE_EXTERNAL_EMOJIS | Permissions.CONNECT | Permissions.MUTE_MEMBERS | Permissions.MOVE_MEMBERS | Permissions.MANAGE_ROLES | Permissions.MANAGE_WEBHOOKS | Permissions.USE_APPLICATION_COMMANDS | Permissions.REQUEST_TO_SPEAK | Permissions.MANAGE_EVENTS | Permissions.USE_EXTERNAL_STICKERS | Permissions.CREATE_EVENTS | Permissions.SEND_VOICE_MESSAGES | Permissions.SEND_POLLS | Permissions.USE_EXTERNAL_APPS | Permissions.BYPASS_SLOWMODE
ELEVATED
module-attribute
¶
ELEVATED = Permissions.KICK_MEMBERS | Permissions.BAN_MEMBERS | Permissions.ADMINISTRATOR | Permissions.MANAGE_CHANNELS | Permissions.MANAGE_GUILD | Permissions.MANAGE_MESSAGES | Permissions.MANAGE_ROLES | Permissions.MANAGE_WEBHOOKS | Permissions.MANAGE_GUILD_EXPRESSIONS | Permissions.MANAGE_THREADS | Permissions.VIEW_CREATOR_MONETIZATION_ANALYTICS
TIMED_OUT
module-attribute
¶
TIMED_OUT = Permissions.VIEW_CHANNEL | Permissions.READ_MESSAGE_HISTORY
compute_permissions
¶
compute_permissions(guild: Guild, member: AnyMember, channel: Channel | None = None, *, parent: Channel | None = None) -> Permissions
The member's permissions guild-wide, or in channel; a thread needs parent.
top_role
¶
The member's highest role, or None when it has only @everyone.
display_colors
¶
display_colors(guild: Guild, member: AnyMember) -> RoleColors | None
The colors of the member's highest colored role, which its name shows.