telegram_bot2/models/command_scope.rs
1use serde::{Deserialize, Serialize};
2
3/// This object represents the scope to which bot commands are applied
4#[derive(Serialize, Deserialize, Clone, Debug, Default)]
5#[serde(tag = "type")]
6pub enum BotCommandScope {
7 /// Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user
8 #[default]
9 Default,
10
11 /// Represents the scope of bot commands, covering all private chats
12 AllPrivateChats,
13
14 /// Represents the scope of bot commands, covering all group and supergroup chats
15 AllGroupChats,
16
17 /// Represents the scope of bot commands, covering all group and supergroup chat administrators
18 AllChatAdministrator,
19
20 /// Represents the scope of bot commands, covering a specific chat
21 Chat {
22 /// Unique identifier for the target chat or username of the target supergroup
23 chat_id: i128,
24 },
25
26 /// Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat
27 ChatAdministrator {
28 /// Unique identifier for the target chat or username of the target supergroup
29 chat_id: i128,
30 },
31
32 /// Represents the scope of bot commands, covering a specific member of a group or supergroup chat
33 ChatMember {
34 /// Unique identifier for the target chat or username of the target supergroup
35 chat_id: i128,
36 /// Unique identifier of the target user
37 user_id: i128,
38 },
39}