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

The name of the sticker, if any

Type:

str | None

guild_id

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

Type:

int | None

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

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 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

property url: str

Returns the sticker’s URL.

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

Bases: PartialSticker

Represents a sticker object.

Parameters:
available

Whether the sticker is available

Type:

bool

description

The description of the sticker

Type:

str

format_type

The format type of the sticker

Type:

StickerFormatType

pack_id

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

Type:

int | None

sort_value

The sort value of the sticker, if any

Type:

int | None

tags

The tags of the sticker

Type:

str

type

The type of the sticker

Type:

StickerType

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

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

property url: str

Returns the sticker’s URL.