ClientCompoundStickerEndpoints
Methods
()
__new__Compound components do not support instancing.
Sub-typing is supported, but the attributes are only proxied. Sub-types have no meaning by themselves.
Raises
RuntimeError
(guild, name, tags, image, ...)
sticker_createCreates a sticker in the guild.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
guild |
| The guild to create the sticker in. | |||
name |
| The sticker's name. | |||
tags |
| The tags of the sticker. | |||
image |
| The sticker's image in bytes. | |||
description |
|
| The sticker's representation. | ||
reason |
|
| Will show up at the respective guild's audit logs. |
Returns
sticker : Sticker
The created sticker.
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
ValueError
If image
s media type is neither image/png
nor application/json
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(sticker, ...)
sticker_deleteDeletes the sticker.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
sticker |
| The sticker to delete. | |||
reason |
|
| Will show up at the respective guild's audit logs. |
Raises
TypeError
If sticker
is neither Sticker
, nor int
.
ValueError
- Standard stickers cannot be deleted.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(sticker, ...)
sticker_editEdits the given guild bound sticker,
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
sticker |
| The respective sticker. | |||
name |
| New name of the sticker. It's length can be in range [2:32]. | |||
tags |
| The new emoji representation of the sticker. Used as a tag for the sticker. | |||
description |
| New description for the sticker. It's length can be in range [0:100]. | |||
reason |
|
| Will show up at the respective guild's audit logs. |
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
- Standard stickers cannot be edited.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(sticker, ...)
sticker_getGets an sticker by it's id. If the sticker is already loaded updates it.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
sticker |
| The sticker, who will be requested. | |||
force_update |
|
| Whether the sticker should be requested even if it supposed to be up to date. |
Returns
sticker : Sticker
Raises
TypeError
If sticker
was not given neither as Sticker
, neither as int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
TypeError
If sticker
was not given as Sticker
, nor as int
.
(guild)
sticker_get_all_guildSyncs the given guild's stickers with the wrapper.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
guild |
| The guild, what's stickers will be synced. |
Returns
stickers : list
of Sticker
The guild's stickers.
Raises
TypeError
If guild
was not given neither as Guild
nor as int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(sticker, ...)
sticker_get_guildGets the specified sticker from the respective guild.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
sticker |
| The sticker to get. | |||
force_update |
|
| Whether the sticker should be requested even if it supposed to be up to date. |
Raises
TypeError
If sticker
is not Sticker
, tuple
(int
, int
).
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
()
sticker_guild_createDeprecated and will be removed in 2023 December. Please use .sticker_create
instead.
()
sticker_guild_deleteDeprecated and will be removed in 2023 December. Please use .sticker_delete
instead.
()
sticker_guild_editDeprecated and will be removed in 2023 December. Please use .sticker_edit
instead.
()
sticker_guild_getDeprecated and will be removed in 2023 December. Please use .sticker_get_guild
instead.
()
sticker_guild_get_allDeprecated and will be removed in 2023 December. Please use .sticker_get_all_guild
instead.
(sticker_pack, ...)
sticker_pack_getGets the sticker packs. If the sticker-packs are already loaded, updates them.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
sticker_pack |
| The sticker pack' identifier. | |||
force_update |
|
| Whether the sticker-pack should be requested even if it supposed to be up to date. |
Returns
sticker_packs : list
of StickerPack
Raises
TypeError ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(...)
sticker_pack_get_allGets the sticker packs. If the sticker-packs are already loaded, updates them.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
force_update |
|
| Whether the sticker-packs should be requested even if it supposed to be up to date. |
Returns
sticker_packs : list
of StickerPack
Raises
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.