Sticker

discord_http.sticker module

class discord_http.sticker.PartialSticker(*, state, id, name=None, guild_id=None)

Bases: PartialBase

Represents a partial sticker object.

Parameters:
name: str | None

The name of the sticker, if any.

guild_id: int | None

The ID of the guild this sticker is in, if any.

async fetch() Sticker

Returns the sticker data.

Return type:

Sticker

property guild: Guild | PartialGuild | None

Returns the guild this sticker is in.

Return type:

The guild this sticker is in

Raises:

ValueError – guild_id is not defined, unable to create PartialGuild

async edit(*, name=<MISSING>, description=<MISSING>, tags=<MISSING>, guild_id=None, reason=None) Sticker

Edits the sticker.

Parameters:
  • guild_id (int | None) – Guild ID to edit the sticker from

  • name (str | None) – Replacement name for the sticker

  • description (str | None) – Replacement description for the sticker

  • tags (str | None) – Replacement tags for the sticker

  • reason (str | None) – The reason for editing the sticker

Return type:

Sticker

Returns:

The edited sticker

Raises:

ValueError – No guild_id was passed

async delete(*, guild_id=None, reason=None) None

Deletes the sticker.

Parameters:
  • guild_id (int | None) – Guild ID to delete the sticker from

  • reason (str | None) – The reason for deleting the sticker

Raises:

ValueError – No guild_id was passed or guild_id is not defined

Return type:

None

property url: str

Returns the sticker’s URL.

property created_at: datetime

The datetime of the snowflake.

id: int

The ID of the snowflake.

class discord_http.sticker.Sticker(*, state, data, guild)

Bases: PartialSticker

Represents a sticker object.

Parameters:
available: bool

Whether the sticker is available.

description: str

The description of the sticker.

format_type: StickerFormatType

The format type of the sticker.

pack_id: int | None

The ID of the sticker pack this sticker belongs to, if any.

sort_value: int | None

The sort value of the sticker, if any.

tags: str

The tags of the sticker.

property created_at: datetime

The datetime of the snowflake.

async fetch() Sticker

Returns the sticker data.

Return type:

Sticker

property guild: Guild | PartialGuild | None

Returns the guild this sticker is in.

Return type:

The guild this sticker is in

Raises:

ValueError – guild_id is not defined, unable to create PartialGuild

guild_id: int | None

The ID of the guild this sticker is in, if any.

id: int

The ID of the snowflake.

name: str

The name of the sticker, if any.

property type: StickerType

The type of the sticker.

property url: str

Returns the sticker’s URL.

async edit(*, name=<MISSING>, description=<MISSING>, tags=<MISSING>, reason=None) Sticker

Edits the sticker.

Parameters:
  • name (str | None) – Name of the sticker

  • description (str | None) – Description of the sticker

  • tags (str | None) – Tags of the sticker

  • reason (str | None) – The reason for editing the sticker

Return type:

Sticker

Returns:

The edited sticker

async delete(*, reason=None) None

Deletes the sticker.

Parameters:

reason (str | None) – The reason for deleting the sticker

Raises:

ValueError – Guild is not defined

Return type:

None