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 True on success.

Source: https://core.telegram.org/bots/api#setmysettings

supports_inline_queries: bool | None

Pass True to enable inline mode for the bot or False to 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 True to request the location of the user with every inline query to the bot or False to stop requesting it

inline_feedback_share_denominator: int | None

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 True to allow adding the bot to groups or False to disallow it

can_read_all_group_messages: bool | None

Pass True to disable privacy mode for the bot or False to enable it

can_connect_to_business: bool | None

Pass True to allow connecting the bot to user accounts to manage them or False to disallow it

can_manage_bots: bool | None

Pass True to allow creating other bots that will be controlled by the bot or False to disallow it

supports_guest_queries: bool | None

Pass True to allow guest queries to the bot from chats it isn’t a member of or False to disallow them

supports_join_request_queries: bool | None

Pass True to allow assigning the bot to process join request queries or False to disallow it

has_topics_enabled: bool | None

Pass True to enable forum topic mode in private chats with the bot or False to disable it

allows_users_to_create_topics: bool | None

Pass True to allow users to create and delete topics in private chats with the bot or False to disallow it

has_topic_sidebar: bool | None

Pass True to show topics in private chats with the bot in a sidebar or False to stop showing them in a sidebar

can_communicate_with_bots: bool | None

Pass True to allow the bot to communicate with other bots in groups, private chats, and through business accounts or False to 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.InaccessibleMessage if 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 SetMySettings

  • alias: from aiogram.methods import SetMySettings

With specific bot

result: bool = await bot(SetMySettings(...))

As reply into Webhook in handler

return SetMySettings(...)