mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
55 lines
No EOL
1.2 KiB
ReStructuredText
55 lines
No EOL
1.2 KiB
ReStructuredText
#################
|
|
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 admin 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.
|
|
|
|
Returns: :obj:`bool`
|
|
|
|
.. automodule:: aiogram.methods.set_chat_sticker_set
|
|
:members:
|
|
:member-order: bysource
|
|
:special-members: __init__
|
|
:undoc-members: True
|
|
|
|
|
|
Usage
|
|
=====
|
|
|
|
As bot method
|
|
-------------
|
|
|
|
.. code-block::
|
|
|
|
result: bool = await bot.set_chat_sticker_set(...)
|
|
|
|
|
|
Method as object
|
|
----------------
|
|
|
|
Imports:
|
|
|
|
- :code:`from aiogram.methods import SetChatStickerSet`
|
|
- :code:`from aiogram.methods import SetChatStickerSet`
|
|
- :code:`from aiogram.methods.set_chat_sticker_set import SetChatStickerSet`
|
|
|
|
In handlers with current bot
|
|
----------------------------
|
|
|
|
.. code-block::
|
|
|
|
result: bool = await SetChatStickerSet(...)
|
|
|
|
With specific bot
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
.. code-block::
|
|
|
|
result: bool = await bot(SetChatStickerSet(...))
|
|
|
|
As reply into Webhook in handler
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. code-block::
|
|
|
|
return SetChatStickerSet(...) |