File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5153,7 +5153,33 @@ _EOF
51535153
51545154 ShellBot.setMyCommands ()
51555155 {
5156- :
5156+ local jq_obj commands
5157+
5158+ local param=$( getopt --name " $FUNCNAME " \
5159+ --options ' c:' \
5160+ --longoptions ' commands:' \
5161+ -- " $@ " )
5162+
5163+ eval set -- " $param "
5164+
5165+ while :
5166+ do
5167+ case $1 in
5168+ -c|--commands) commands=$2 ;;
5169+ --) break ;;
5170+ esac
5171+ shift 2
5172+ done
5173+
5174+ [[ $commands ]] || MessageError API " $_ERR_PARAM_REQUIRED_ " " [-c, --commands]"
5175+
5176+ jq_obj=$( curl $_CURL_OPT_ POST $_API_TELEGRAM_ /${FUNCNAME#* .} ${commands: +-d commands=" $commands " } )
5177+
5178+ # Retorno do método
5179+ MethodReturn $jq_obj || MessageError TG $jq_obj
5180+
5181+ # Status
5182+ return $?
51575183 }
51585184
51595185 ShellBot.BotCommand ()
@@ -6007,6 +6033,9 @@ _EOF
60076033 ShellBot.sendPoll \
60086034 ShellBot.KeyboardButtonPollType \
60096035 ShellBot.sendDice \
6036+ ShellBot.getMyCommands \
6037+ ShellBot.setMyCommands \
6038+ ShellBot.BotCommand \
60106039 ShellBot.setMessageRules \
60116040 ShellBot.manageRules \
60126041 ShellBot.getUpdates
You can’t perform that action at this time.
0 commit comments