Sticker¶
discord_http.sticker module¶
- class discord_http.sticker.PartialSticker(*, state: DiscordAPI, id: int, name: str | None = None, guild_id: int | None = None)[source]¶
Bases:
PartialBase
- async delete(*, guild_id: int | None = None, reason: str | None = None) None [source]¶
Deletes the sticker
- Parameters:
guild_id (int) – Guild ID to delete the sticker from
reason (Optional[str]) – The reason for deleting the sticker
- Raises:
ValueError – No guild_id was passed or guild_id is not defined
- async edit(*, name: str | None = <MISSING>, description: str | None = <MISSING>, tags: str | None = <MISSING>, guild_id: int | None = None, reason: str | None = None) Sticker [source]¶
Edits the sticker
- Parameters:
guild_id (Optional[int]) – Guild ID to edit the sticker from
name (Optional[str]) – Replacement name for the sticker
description (Optional[str]) – Replacement description for the sticker
tags (Optional[str]) – Replacement tags for the sticker
reason (Optional[str]) – The reason for editing the sticker
- Returns:
The edited sticker
- Return type:
Sticker
- Raises:
ValueError – No guild_id was passed
- property guild: PartialGuild | None¶
Returns the guild this sticker is in
- Returns:
The guild this sticker is in
- Return type:
PartialGuild
- Raises:
ValueError – guild_id is not defined, unable to create PartialGuild
- property url: str¶
Returns the sticker’s URL
- Type:
str
- class discord_http.sticker.Sticker(*, state: DiscordAPI, data: dict, guild: PartialGuild | None)[source]¶
Bases:
PartialSticker
- async delete(*, reason: str | None = None) None [source]¶
Deletes the sticker
- Parameters:
reason (Optional[str]) – The reason for deleting the sticker
- Raises:
ValueError – Guild is not defined
- async edit(*, name: str | None = <MISSING>, description: str | None = <MISSING>, tags: str | None = <MISSING>, reason: str | None = None) Sticker [source]¶
Edits the sticker
- Parameters:
name (Optional[str]) – Name of the sticker
description (Optional[str]) – Description of the sticker
tags (Optional[str]) – Tags of the sticker
reason (Optional[str]) – The reason for editing the sticker
- Returns:
The edited sticker
- Return type:
Sticker
- property url: str¶
Returns the sticker’s URL
- Type:
str