setChatStickerSet¶
Returns: bool
- class aiogram.methods.set_chat_sticker_set.SetChatStickerSet(*, chat_id: int | str, sticker_set_name: str, **extra_data: Any)[source]¶
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
aiogram.methods.get_chat.GetChat
requests to check if the bot can use this method. ReturnsTrue
on success.Source: https://core.telegram.org/bots/api#setchatstickerset
- chat_id: int | str¶
Unique identifier for the target chat or username of the target supergroup (in the format
@supergroupusername
)
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_post_init(context: Any, /) None ¶
We need to both initialize private attributes and call the user-defined model_post_init method.
- sticker_set_name: str¶
Name of the sticker set to be set as the group sticker set
Usage¶
As bot method¶
result: bool = await bot.set_chat_sticker_set(...)
Method as object¶
Imports:
from aiogram.methods.set_chat_sticker_set import SetChatStickerSet
alias:
from aiogram.methods import SetChatStickerSet
With specific bot¶
result: bool = await bot(SetChatStickerSet(...))
As reply into Webhook in handler¶
return SetChatStickerSet(...)