setMySettings¶
Returns: bool
- class aiogram.methods.set_my_settings.SetMySettings(*, supports_inline_queries: bool | None = None, inline_query_placeholder: str | None = None, needs_inline_query_location: bool | None = None, inline_feedback_share_denominator: int | None = None, can_join_groups: bool | None = None, can_read_all_group_messages: bool | None = None, can_connect_to_business: bool | None = None, can_manage_bots: bool | None = None, supports_guest_queries: bool | None = None, supports_join_request_queries: bool | None = None, has_topics_enabled: bool | None = None, allows_users_to_create_topics: bool | None = None, has_topic_sidebar: bool | None = None, can_communicate_with_bots: bool | None = None, callback_query_mode: str | None = None, **extra_data: Any)[source]¶
Use this method to change settings of the bot. Settings that aren’t specified remain unchanged. Returns
Trueon success.Source: https://core.telegram.org/bots/api#setmysettings
- supports_inline_queries: bool | None¶
Pass
Trueto enable inline mode for the bot orFalseto disable it
- inline_query_placeholder: str | None¶
New placeholder for inline queries, which is shown in the input field after the bot’s username. Pass an empty string to use the default placeholder
- needs_inline_query_location: bool | None¶
Pass
Trueto request the location of the user with every inline query to the bot orFalseto stop requesting it
Denominator of the share of chosen inline results received by the bot; the bot receives 1 out of inline_feedback_share_denominator chosen results. Must be one of 1, 10, 100, or 1000. Pass 0 to stop receiving chosen inline results
- can_join_groups: bool | None¶
Pass
Trueto allow adding the bot to groups orFalseto disallow it
- can_read_all_group_messages: bool | None¶
Pass
Trueto disable privacy mode for the bot orFalseto enable it
- can_connect_to_business: bool | None¶
Pass
Trueto allow connecting the bot to user accounts to manage them orFalseto disallow it
- can_manage_bots: bool | None¶
Pass
Trueto allow creating other bots that will be controlled by the bot orFalseto disallow it
- supports_guest_queries: bool | None¶
Pass
Trueto allow guest queries to the bot from chats it isn’t a member of orFalseto disallow them
- supports_join_request_queries: bool | None¶
Pass
Trueto allow assigning the bot to process join request queries orFalseto disallow it
- has_topics_enabled: bool | None¶
Pass
Trueto enable forum topic mode in private chats with the bot orFalseto disable it
- allows_users_to_create_topics: bool | None¶
Pass
Trueto allow users to create and delete topics in private chats with the bot orFalseto disallow it
- has_topic_sidebar: bool | None¶
Pass
Trueto show topics in private chats with the bot in a sidebar orFalseto stop showing them in a sidebar
- can_communicate_with_bots: bool | None¶
Pass
Trueto allow the bot to communicate with other bots in groups, private chats, and through business accounts orFalseto disallow it
- callback_query_mode: str | None¶
Mode in which the bot receives callback queries from buttons in messages sent by the bot. Must be one of ‘default’ (the field message is always used and contains an
aiogram.types.inaccessible_message.InaccessibleMessageif the message is inaccessible to the bot), ‘auto’ (the field inline_message_id is used instead of the field message if the message is inaccessible to the bot; the field message can still contain an inaccessible message if the message has just been deleted), or ‘inline’ (the field inline_message_id is always used instead of the field message)
Usage¶
As bot method¶
result: bool = await bot.set_my_settings(...)
Method as object¶
Imports:
from aiogram.methods.set_my_settings import SetMySettingsalias:
from aiogram.methods import SetMySettings
With specific bot¶
result: bool = await bot(SetMySettings(...))
As reply into Webhook in handler¶
return SetMySettings(...)