Skip to main content

teloxide_core/payloads/
set_my_settings.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{CallbackQueryMode, True};
6
7impl_payload! {
8    /// Use this method to change the settings of the bot. Settings that aren't specified remain unchanged. Returns *True* on success.
9    #[derive(Debug, PartialEq, Eq, Hash, Default, Clone, Serialize)]
10    pub SetMySettings (SetMySettingsSetters) => True {
11        optional {
12            /// Pass *True* to enable [inline mode] for the bot or *False* to disable it
13            ///
14            /// [inline mode]: https://core.telegram.org/bots/api#inline-mode
15            pub supports_inline_queries: bool,
16            /// 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.
17            pub inline_query_placeholder: String [into],
18            /// Pass *True* to request the location of the user with every inline query to the bot or *False* to stop requesting it
19            pub needs_inline_query_location: bool,
20            /// 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.
21            ///
22            /// [chosen inline results]: https://core.telegram.org/bots/api#choseninlineresult
23            pub inline_feedback_share_denominator: u32,
24            /// Pass *True* to allow adding the bot to groups or *False* to disallow it
25            pub can_join_groups: bool,
26            /// Pass *True* to disable [privacy mode] for the bot or *False* to enable it
27            ///
28            /// [privacy mode]: https://core.telegram.org/bots/features#privacy-mode
29            pub can_read_all_group_messages: bool,
30            /// Pass *True* to allow connecting the bot to user accounts to manage them or *False* to disallow it
31            pub can_connect_to_business: bool,
32            /// Pass *True* to allow creating other bots that will be controlled by the bot or *False* to disallow it
33            pub can_manage_bots: bool,
34            /// Pass *True* to allow guest queries to the bot from chats it isn't a member of or *False* to disallow them
35            pub supports_guest_queries: bool,
36            /// Pass *True* to allow assigning the bot to process join request queries or *False* to disallow it
37            pub supports_join_request_queries: bool,
38            /// Pass *True* to enable forum topic mode in private chats with the bot or *False* to disable it
39            pub has_topics_enabled: bool,
40            /// Pass *True* to allow users to create and delete topics in private chats with the bot or *False* to disallow it
41            pub allows_users_to_create_topics: bool,
42            /// Pass *True* to show topics in private chats with the bot in a sidebar or *False* to stop showing them in a sidebar
43            pub has_topic_sidebar: bool,
44            /// Pass *True* to allow the bot to communicate with other bots in groups, private chats, and through business accounts or *False* to disallow it
45            pub can_communicate_with_bots: bool,
46            /// 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 [`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*).
47            ///
48            /// [callback queries]: https://core.telegram.org/bots/api#callbackquery
49            /// [`InaccessibleMessage`]: crate::types::InaccessibleMessage
50            pub callback_query_mode: CallbackQueryMode,
51        }
52    }
53}