Available methods

setChatStickerSet()

Use this method to set a new group sticker set for 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

parametertyperequireddescription
chat_idnumber | stringrequiredUnique identifier for the target chat or username of the target supergroup in the format @username
sticker_set_namestringrequiredName of the sticker set to be set as the group sticker set

returns

boolean

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
import type { SetChatStickerSetParams } from "@yaebal/types";

await bot.api.call<boolean>("setChatStickerSet", {
  chat_id: 123456789,
  sticker_set_name: "...",
} satisfies SetChatStickerSetParams);

context shortcut

also available as ctx.setChatStickerSet() on 16 context types — see @yaebal/contexts.

context shortcut
/** Use this method to set a new group sticker set for 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](https://core.telegram.org/bots/api/#getchat) requests to check if the bot can use this method. Returns *True* on success. */
ctx.setChatStickerSet(params: Omit<SetChatStickerSetParams, "chat_id">)