File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1037,6 +1037,20 @@ func (bot *BotAPI) GetStickerSet(config GetStickerSetConfig) (StickerSet, error)
10371037 return stickerSet , nil
10381038}
10391039
1040+ // GetMyCommands gets the current list of the bot's commands.
1041+ func (bot * BotAPI ) GetMyCommands () ([]BotCommand , error ) {
1042+ res , err := bot .MakeRequest ("getMyCommands" , nil )
1043+ if err != nil {
1044+ return nil , err
1045+ }
1046+ var commands []BotCommand
1047+ err = json .Unmarshal (res .Result , & commands )
1048+ if err != nil {
1049+ return nil , err
1050+ }
1051+ return commands , nil
1052+ }
1053+
10401054// SetMyCommands changes the list of the bot's commands.
10411055func (bot * BotAPI ) SetMyCommands (commands []BotCommand ) error {
10421056 v := url.Values {}
You can’t perform that action at this time.
0 commit comments