Skip to content

hikari.stickers#

Application and entities that are used to describe stickers on Discord.

GuildSticker #

Bases: PartialSticker

Represents a Discord sticker that belongs to a guild.

description class-attribute instance-attribute #

description: Optional[str] = field(eq=False, hash=False, repr=False)

The description of this sticker.

guild_id class-attribute instance-attribute #

guild_id: Snowflake = field(eq=False, hash=False)

The guild this sticker belongs to.

is_available class-attribute instance-attribute #

is_available: bool = field(eq=False, hash=False)

Whether the sticker can be used.

tag class-attribute instance-attribute #

tag: str = field(eq=False, hash=False)

This sticker's tag.

type class-attribute instance-attribute #

type: StickerType = field(eq=False, hash=False, repr=False, init=False, default=GUILD)

The sticker type.

user class-attribute instance-attribute #

user: Optional[User] = field(eq=False, hash=False, repr=False)

The user that uploaded this sticker.

This will only be available if you have the hikari.permissions.Permissions.MANAGE_GUILD_EXPRESSIONS permission.

PartialSticker #

Bases: Unique

Represents the partial stickers found attached to messages on Discord.

format_type class-attribute instance-attribute #

format_type: Union[StickerFormatType, int] = field(eq=False, hash=False, repr=True)

The format of this sticker's asset.

id class-attribute instance-attribute #

id: Snowflake = field(hash=True, repr=True)

The ID of this entity.

image_url property #

image_url: URL

URL for the image.

The extension will be based on format_type. If format_type is hikari.stickers.StickerFormatType.LOTTIE, then the extension will be .json, if it's hikari.stickers.StickerFormatType.GIF it will be .gif. Otherwise, it will be .png.

name class-attribute instance-attribute #

name: str = field(eq=False, hash=False, repr=False)

The name of the sticker.

StandardSticker #

Bases: PartialSticker

Represents a standard Discord sticker that belongs to a pack.

description class-attribute instance-attribute #

description: Optional[str] = field(eq=False, hash=False, repr=False)

The description of this sticker.

pack_id class-attribute instance-attribute #

pack_id: Snowflake = field(eq=False, hash=False, repr=True)

ID of the package this sticker belongs to.

sort_value class-attribute instance-attribute #

sort_value: int = field(eq=False, hash=False, repr=False)

The sort value for the sticker in its pack.

tags class-attribute instance-attribute #

tags: Sequence[str] = field(eq=False, hash=False, repr=True)

A sequence of this sticker's tags.

type class-attribute instance-attribute #

type: StickerType = field(eq=False, hash=False, repr=False, init=False, default=STANDARD)

The sticker type.

StickerFormatType #

Bases: int, Enum

The formats types of a sticker's asset.

APNG class-attribute instance-attribute #

APNG = 2

A animated PNG sticker.

GIF class-attribute instance-attribute #

GIF = 4

A GIF sticker.

LOTTIE class-attribute instance-attribute #

LOTTIE = 3

A lottie sticker.

More information can be found here: https://airbnb.io/lottie/

PNG class-attribute instance-attribute #

PNG = 1

A PNG sticker.

StickerPack #

Bases: Unique

Represents a sticker pack on Discord.

banner_asset_id class-attribute instance-attribute #

banner_asset_id: Optional[Snowflake] = field(eq=False, hash=False, repr=False)

ID of the sticker pack's banner image, if set.

banner_url property #

banner_url: Optional[URL]

Banner URL for the pack, if set.

cover_sticker_id class-attribute instance-attribute #

cover_sticker_id: Optional[Snowflake] = field(eq=False, hash=False, repr=False)

The ID of a sticker in the pack which is shown as the pack's icon.

description class-attribute instance-attribute #

description: str = field(eq=False, hash=False, repr=False)

The description of the pack.

id class-attribute instance-attribute #

id: Snowflake = field(hash=True, repr=True)

The ID of this entity.

name class-attribute instance-attribute #

name: str = field(eq=False, hash=False, repr=False)

The name of the pack.

sku_id class-attribute instance-attribute #

sku_id: Snowflake = field(eq=False, hash=False, repr=False)

The ID of the packs SKU.

stickers class-attribute instance-attribute #

stickers: Sequence[StandardSticker] = field(eq=False, hash=False, repr=False)

The stickers that belong to this pack.

make_banner_url #

make_banner_url(*, ext: str = 'png', size: int = 4096) -> Optional[URL]

Generate the pack's banner image URL, if set.

PARAMETER DESCRIPTION
ext

The extension to use for this URL. Supports png, jpeg, jpg and webp.

TYPE: str DEFAULT: 'png'

size

The size to set for the URL. Can be any power of two between 16 and 4096.

TYPE: int DEFAULT: 4096

RETURNS DESCRIPTION
Optional[URL]

The URL of the banner, if set.

RAISES DESCRIPTION
ValueError

If size is not a power of two or not between 16 and 4096.

StickerType #

Bases: int, Enum

The sticker type.

GUILD class-attribute instance-attribute #

GUILD = 2

A sticker uploaded to a guild.

STANDARD class-attribute instance-attribute #

STANDARD = 1

An official sticker in a pack, part of Nitro or in a removed purchasable pack.