setStickerSetTitle
Returns: TrueOfficial docs ↗
Use this method to set the title of a created sticker set. Returns True on success.
Parameters
nameStringRequiredSticker set name
titleStringRequiredminLen 1maxLen 64Sticker set title, 1-64 characters
Returns
On success, True is returned.
GramIO Usage
ts
// Update the display title of a sticker set
await bot.api.setStickerSetTitle({
name: "my_pack_by_mybot",
title: "My Awesome Sticker Pack",
});ts
// Rename the sticker set with a localized title
await bot.api.setStickerSetTitle({
name: "my_pack_by_mybot",
title: "Мой набор стикеров",
});ts
// Confirm the new title by fetching the set afterward
await bot.api.setStickerSetTitle({
name: "my_pack_by_mybot",
title: "Updated Pack Name",
});
const set = await bot.api.getStickerSet({ name: "my_pack_by_mybot" });
console.log(set.title); // "Updated Pack Name"Errors
| Code | Error | Cause |
|---|---|---|
| 400 | Bad Request: STICKERSET_INVALID | The sticker set name doesn't exist or doesn't belong to this bot |
| 400 | Bad Request: title is empty | title is an empty string — must be 1–64 characters |
| 400 | Bad Request: title is too long | title exceeds 64 characters — shorten it |
| 429 | Too Many Requests: retry after N | Rate limit hit — check retry_after, use auto-retry plugin |
TIP
Use GramIO's auto-retry plugin to handle 429 errors automatically.
Tips & Gotchas
namevstitle— these are different things. Thenameis the permanent, immutable identifier (e.g.,my_pack_by_mybot) used in URLs and API calls. Thetitleis the human-readable display name shown to users — onlytitlecan be changed with this method.- The sticker set
namecannot be changed. Once a set is created with a givenname, it's permanent. Only the displaytitleis mutable via this method. - 1–64 characters, no minimum restriction on content. Any non-empty string up to 64 chars is valid. Emoji and Unicode are allowed.
- Title change is reflected immediately. Users see the updated title in the sticker picker and on the sticker set page without any cache delay.
- Only works on bot-created sets. You cannot rename sticker sets created by other bots or via BotFather.
See Also
- createNewStickerSet — create a new sticker set (sets both name and initial title)
- getStickerSet — retrieve current sticker set details including title
- setStickerSetThumbnail — update the sticker set's thumbnail image
- deleteStickerFromSet — remove a sticker from the set
- StickerSet — sticker set object with name and title fields