@@ -837,7 +837,103 @@ func NewDiceWithEmoji(chatID int64, emoji string) DiceConfig {
837837 }
838838}
839839
840+ // NewBotCommandScopeDefault represents the default scope of bot commands.
841+ func NewBotCommandScopeDefault () BotCommandScope {
842+ return BotCommandScope {Type : "default" }
843+ }
844+
845+ // NewBotCommandScopeAllPrivateChats represents the scope of bot commands,
846+ // covering all private chats.
847+ func NewBotCommandScopeAllPrivateChats () BotCommandScope {
848+ return BotCommandScope {Type : "all_private_chats" }
849+ }
850+
851+ // NewBotCommandScopeAllGroupChats represents the scope of bot commands,
852+ // covering all group and supergroup chats.
853+ func NewBotCommandScopeAllGroupChats () BotCommandScope {
854+ return BotCommandScope {Type : "all_group_chats" }
855+ }
856+
857+ // NewBotCommandScopeAllChatAdministrators represents the scope of bot commands,
858+ // covering all group and supergroup chat administrators.
859+ func NewBotCommandScopeAllChatAdministrators () BotCommandScope {
860+ return BotCommandScope {Type : "all_chat_administrators" }
861+ }
862+
863+ // NewBotCommandScopeChat represents the scope of bot commands, covering a
864+ // specific chat.
865+ func NewBotCommandScopeChat (chatID int64 ) BotCommandScope {
866+ return BotCommandScope {
867+ Type : "chat" ,
868+ ChatID : chatID ,
869+ }
870+ }
871+
872+ // NewBotCommandScopeChatAdministrators represents the scope of bot commands,
873+ // covering all administrators of a specific group or supergroup chat.
874+ func NewBotCommandScopeChatAdministrators (chatID int64 ) BotCommandScope {
875+ return BotCommandScope {
876+ Type : "chat_administrators" ,
877+ ChatID : chatID ,
878+ }
879+ }
880+
881+ // NewBotCommandScopeChatMember represents the scope of bot commands, covering a
882+ // specific member of a group or supergroup chat.
883+ func NewBotCommandScopeChatMember (chatID , userID int64 ) BotCommandScope {
884+ return BotCommandScope {
885+ Type : "chat_member" ,
886+ ChatID : chatID ,
887+ UserID : userID ,
888+ }
889+ }
890+
891+ // NewGetMyCommands allows you to set the registered commands.
892+ func NewGetMyCommands () GetMyCommandsConfig {
893+ return GetMyCommandsConfig {}
894+ }
895+
896+ // NewGetMyCommandsWithScope allows you to set the registered commands for a
897+ // given scope.
898+ func NewGetMyCommandsWithScope (scope BotCommandScope ) GetMyCommandsConfig {
899+ return GetMyCommandsConfig {Scope : & scope }
900+ }
901+
902+ // NewGetMyCommandsWithScopeAndLanguage allows you to set the registered
903+ // commands for a given scope and language code.
904+ func NewGetMyCommandsWithScopeAndLanguage (scope BotCommandScope , languageCode string ) GetMyCommandsConfig {
905+ return GetMyCommandsConfig {Scope : & scope , LanguageCode : languageCode }
906+ }
907+
840908// NewSetMyCommands allows you to set the registered commands.
841909func NewSetMyCommands (commands ... BotCommand ) SetMyCommandsConfig {
842- return SetMyCommandsConfig {commands : commands }
910+ return SetMyCommandsConfig {Commands : commands }
911+ }
912+
913+ // NewSetMyCommands allows you to set the registered commands for a given scope.
914+ func NewSetMyCommandsWithScope (scope BotCommandScope , commands ... BotCommand ) SetMyCommandsConfig {
915+ return SetMyCommandsConfig {Commands : commands , Scope : & scope }
916+ }
917+
918+ // NewSetMyCommands allows you to set the registered commands for a given scope
919+ // and language code.
920+ func NewSetMyCommandsWithScopeAndLanguage (scope BotCommandScope , languageCode string , commands ... BotCommand ) SetMyCommandsConfig {
921+ return SetMyCommandsConfig {Commands : commands , Scope : & scope , LanguageCode : languageCode }
922+ }
923+
924+ // NewDeleteMyCommands allows you to delete the registered commands.
925+ func NewDeleteMyCommands () DeleteMyCommandsConfig {
926+ return DeleteMyCommandsConfig {}
927+ }
928+
929+ // NewDeleteMyCommands allows you to delete the registered commands for a given
930+ // scope.
931+ func NewDeleteMyCommandsWithScope (scope BotCommandScope ) DeleteMyCommandsConfig {
932+ return DeleteMyCommandsConfig {Scope : & scope }
933+ }
934+
935+ // NewDeleteMyCommands allows you to delete the registered commands for a given
936+ // scope and language code.
937+ func NewDeleteMyCommandsWithScopeAndLanguage (scope BotCommandScope , languageCode string ) DeleteMyCommandsConfig {
938+ return DeleteMyCommandsConfig {Scope : & scope , LanguageCode : languageCode }
843939}
0 commit comments