Skip to content

deleteChatStickerSet

Returns: TrueOfficial docs ↗

Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.

Parameters

chat_idIntegerStringRequired
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)

Returns

On success, True is returned.

GramIO Usage

ts
// Remove the sticker set from a supergroup by numeric ID
await 
bot
.
api
.
deleteChatStickerSet
({
chat_id
: -1001234567890,
});
ts
// Remove the sticker set from a supergroup by username
await 
bot
.
api
.
deleteChatStickerSet
({
chat_id
: "@mysupergroup",
});
ts
// Admin command to remove the group sticker set
bot
.
command
("removestickers", async (
ctx
) => {
await
bot
.
api
.
deleteChatStickerSet
({
chat_id
:
ctx
.
chatId
});
await
ctx
.
send
("Group sticker set has been removed.");
});

Errors

CodeErrorCause
400Bad Request: chat not foundchat_id is invalid or inaccessible
400Bad Request: CHAT_NOT_MODIFIEDThe supergroup has no sticker set to remove
400Bad Request: method is available for supergroup chats onlyThis method only works for supergroups — not regular groups or channels
403Forbidden: not enough rightsBot is not an admin or lacks the right to manage sticker sets
429Too Many Requests: retry after NRate limit hit — check retry_after, use auto-retry plugin

Tips & Gotchas

  • Supergroups only — not regular groups or channels. This method is restricted to supergroups. Calling it on a basic group or channel will fail.
  • Check can_set_sticker_set from getChat first. The Chat object returned by getChat has an optional can_set_sticker_set boolean. If it's false or absent, the bot cannot manage the sticker set in that chat.
  • No need to delete before setting a new sticker set. Calling setChatStickerSet directly replaces the current sticker set — you don't need to call deleteChatStickerSet beforehand.
  • Bot must be admin with can_change_info. The appropriate administrator right for managing sticker sets falls under can_change_info.

See Also