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
#
The description of this sticker.
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.
guild_id
class-attribute
instance-attribute
#
The guild this sticker belongs to.
id
class-attribute
instance-attribute
#
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
.
is_available
class-attribute
instance-attribute
#
Whether the sticker can be used.
name
class-attribute
instance-attribute
#
The name of the sticker.
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
#
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
#
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
.
StandardSticker
#
Bases: PartialSticker
Represents a standard Discord sticker that belongs to a pack.
description
class-attribute
instance-attribute
#
The description of this sticker.
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
#
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
#
The name of the sticker.
pack_id
class-attribute
instance-attribute
#
ID of the package this sticker belongs to.
sort_value
class-attribute
instance-attribute
#
The sort value for the sticker in its pack.
tags
class-attribute
instance-attribute
#
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.
LOTTIE
class-attribute
instance-attribute
#
A lottie sticker.
More information can be found here: https://airbnb.io/lottie/
StickerPack
#
Bases: Unique
Represents a sticker pack on Discord.
banner_asset_id
class-attribute
instance-attribute
#
ID of the sticker pack's banner image, if set.
cover_sticker_id
class-attribute
instance-attribute
#
The ID of a sticker in the pack which is shown as the pack's icon.
description
class-attribute
instance-attribute
#
The description of the pack.
id
class-attribute
instance-attribute
#
The ID of this entity.
name
class-attribute
instance-attribute
#
The name of the pack.
sku_id
class-attribute
instance-attribute
#
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
#
Generate the pack's banner image URL, if set.
PARAMETER | DESCRIPTION |
---|---|
ext |
The extension to use for this URL.
Supports
TYPE:
|
size |
The size to set for the URL.
Can be any power of two between
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Optional[URL]
|
The URL of the banner, if set. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
If |