@@ -837,7 +837,98 @@ 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+ // NewGetMyCommandsWithScope allows you to set the registered commands for a
892+ // given scope.
893+ func NewGetMyCommandsWithScope (scope BotCommandScope ) GetMyCommandsConfig {
894+ return GetMyCommandsConfig {Scope : & scope }
895+ }
896+
897+ // NewGetMyCommandsWithScopeAndLanguage allows you to set the registered
898+ // commands for a given scope and language code.
899+ func NewGetMyCommandsWithScopeAndLanguage (scope BotCommandScope , languageCode string ) GetMyCommandsConfig {
900+ return GetMyCommandsConfig {Scope : & scope , LanguageCode : languageCode }
901+ }
902+
840903// NewSetMyCommands allows you to set the registered commands.
841904func NewSetMyCommands (commands ... BotCommand ) SetMyCommandsConfig {
842- return SetMyCommandsConfig {commands : commands }
905+ return SetMyCommandsConfig {Commands : commands }
906+ }
907+
908+ // NewSetMyCommands allows you to set the registered commands for a given scope.
909+ func NewSetMyCommandsWithScope (scope BotCommandScope , commands ... BotCommand ) SetMyCommandsConfig {
910+ return SetMyCommandsConfig {Commands : commands , Scope : & scope }
911+ }
912+
913+ // NewSetMyCommands allows you to set the registered commands for a given scope
914+ // and language code.
915+ func NewSetMyCommandsWithScopeAndLanguage (scope BotCommandScope , languageCode string , commands ... BotCommand ) SetMyCommandsConfig {
916+ return SetMyCommandsConfig {Commands : commands , Scope : & scope , LanguageCode : languageCode }
917+ }
918+
919+ // NewDeleteMyCommands allows you to delete the registered commands.
920+ func NewDeleteMyCommands () DeleteMyCommandsConfig {
921+ return DeleteMyCommandsConfig {}
922+ }
923+
924+ // NewDeleteMyCommands allows you to delete the registered commands for a given
925+ // scope.
926+ func NewDeleteMyCommandsWithScope (scope BotCommandScope ) DeleteMyCommandsConfig {
927+ return DeleteMyCommandsConfig {Scope : & scope }
928+ }
929+
930+ // NewDeleteMyCommands allows you to delete the registered commands for a given
931+ // scope and language code.
932+ func NewDeleteMyCommandsWithScopeAndLanguage (scope BotCommandScope , languageCode string ) DeleteMyCommandsConfig {
933+ return DeleteMyCommandsConfig {Scope : & scope , LanguageCode : languageCode }
843934}
0 commit comments