Sticker

discord_http.sticker module

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

Bases: PartialBase

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

Parameters:
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.