@@ -4951,6 +4951,45 @@ _EOF
49514951 return $?
49524952
49534953 }
4954+
4955+ ShellBot.setChatAdministratorCustomTitle ()
4956+ {
4957+ local chat_id user_id custom_title jq_obj
4958+
4959+ local param=$( getopt --name " $FUNCNAME " \
4960+ --options ' c:u:t:' \
4961+ --longoptions ' chat_id:,
4962+ user_id:,
4963+ custom_title:' \
4964+ -- " $@ " )
4965+
4966+ eval set -- " $param "
4967+
4968+ while :
4969+ do
4970+ case $1 in
4971+ -c|--chat_id) chat_id=$2 ; shift 2;;
4972+ -u|--user_id) user_id=$2 ; shift 2;;
4973+ -t|--custom_title) custom_title=$2 ; shift 2;;
4974+ --) shift ; break ;;
4975+ esac
4976+ done
4977+
4978+ [[ $chat_id ]] || MessageError API " $_ERR_PARAM_REQUIRED_ " " [-c, --chat_id]"
4979+ [[ $user_id ]] || MessageError API " $_ERR_PARAM_REQUIRED_ " " [-u, --user_id]"
4980+ [[ $custom_title ]] || MessageError API " $_ERR_PARAM_REQUIRED_ " " [-t, --custom_title]"
4981+
4982+ jq_obj=$( curl $_CURL_OPT_ POST $_API_TELEGRAM_ /${FUNCNAME#* .} \
4983+ ${chat_id: +-d chat_id=" $chat_id " } \
4984+ ${user_id: +-d user_id=" $user_id " } \
4985+ ${custom_tilte: +-d custom_title=" $custom_title " } )
4986+
4987+ # Retorno do método
4988+ MethodReturn $jq_obj || MessageError TG $jq_obj
4989+
4990+ # Status
4991+ return $?
4992+ }
49544993
49554994 ShellBot.setMessageRules ()
49564995 {
@@ -5666,88 +5705,89 @@ _EOF
56665705 }
56675706
56685707 # Bot métodos (somente leitura)
5669- readonly -f ShellBot.token \
5670- ShellBot.id \
5671- ShellBot.username \
5672- ShellBot.first_name \
5673- ShellBot.getConfig \
5674- ShellBot.regHandleFunction \
5675- ShellBot.regHandleExec \
5676- ShellBot.watchHandle \
5677- ShellBot.ListUpdates \
5678- ShellBot.TotalUpdates \
5679- ShellBot.OffsetEnd \
5680- ShellBot.OffsetNext \
5681- ShellBot.getMe \
5682- ShellBot.getWebhookInfo \
5683- ShellBot.deleteWebhook \
5684- ShellBot.setWebhook \
5685- ShellBot.init \
5686- ShellBot.ReplyKeyboardMarkup \
5687- ShellBot.ForceReply \
5688- ShellBot.ReplyKeyboardRemove \
5689- ShellBot.KeyboardButton \
5690- ShellBot.sendMessage \
5691- ShellBot.forwardMessage \
5692- ShellBot.sendPhoto \
5693- ShellBot.sendAudio \
5694- ShellBot.sendDocument \
5695- ShellBot.sendSticker \
5696- ShellBot.sendVideo \
5697- ShellBot.sendVideoNote \
5698- ShellBot.sendVoice \
5699- ShellBot.sendLocation \
5700- ShellBot.sendVenue \
5701- ShellBot.sendContact \
5702- ShellBot.sendChatAction \
5703- ShellBot.getUserProfilePhotos \
5704- ShellBot.getFile \
5705- ShellBot.kickChatMember \
5706- ShellBot.leaveChat \
5707- ShellBot.unbanChatMember \
5708- ShellBot.getChat \
5709- ShellBot.getChatAdministrators \
5710- ShellBot.getChatMembersCount \
5711- ShellBot.getChatMember \
5712- ShellBot.editMessageText \
5713- ShellBot.editMessageCaption \
5714- ShellBot.editMessageReplyMarkup \
5715- ShellBot.InlineKeyboardMarkup \
5716- ShellBot.InlineKeyboardButton \
5717- ShellBot.answerCallbackQuery \
5718- ShellBot.deleteMessage \
5719- ShellBot.exportChatInviteLink \
5720- ShellBot.setChatPhoto \
5721- ShellBot.deleteChatPhoto \
5722- ShellBot.setChatTitle \
5723- ShellBot.setChatDescription \
5724- ShellBot.pinChatMessage \
5725- ShellBot.unpinChatMessage \
5726- ShellBot.promoteChatMember \
5727- ShellBot.restrictChatMember \
5728- ShellBot.getStickerSet \
5729- ShellBot.uploadStickerFile \
5730- ShellBot.createNewStickerSet \
5731- ShellBot.addStickerToSet \
5732- ShellBot.setStickerPositionInSet \
5733- ShellBot.deleteStickerFromSet \
5734- ShellBot.stickerMaskPosition \
5735- ShellBot.downloadFile \
5736- ShellBot.editMessageLiveLocation \
5737- ShellBot.stopMessageLiveLocation \
5738- ShellBot.setChatStickerSet \
5739- ShellBot.deleteChatStickerSet \
5740- ShellBot.sendMediaGroup \
5741- ShellBot.editMessageMedia \
5742- ShellBot.inputMedia \
5743- ShellBot.sendAnimation \
5744- ShellBot.answerInlineQuery \
5745- ShellBot.InlineQueryResult \
5746- ShellBot.InputMessageContent \
5747- ShellBot.ChatPermissions \
5748- ShellBot.setChatPermissions \
5749- ShellBot.setMessageRules \
5750- ShellBot.manageRules \
5708+ readonly -f ShellBot.token \
5709+ ShellBot.id \
5710+ ShellBot.username \
5711+ ShellBot.first_name \
5712+ ShellBot.getConfig \
5713+ ShellBot.regHandleFunction \
5714+ ShellBot.regHandleExec \
5715+ ShellBot.watchHandle \
5716+ ShellBot.ListUpdates \
5717+ ShellBot.TotalUpdates \
5718+ ShellBot.OffsetEnd \
5719+ ShellBot.OffsetNext \
5720+ ShellBot.getMe \
5721+ ShellBot.getWebhookInfo \
5722+ ShellBot.deleteWebhook \
5723+ ShellBot.setWebhook \
5724+ ShellBot.init \
5725+ ShellBot.ReplyKeyboardMarkup \
5726+ ShellBot.ForceReply \
5727+ ShellBot.ReplyKeyboardRemove \
5728+ ShellBot.KeyboardButton \
5729+ ShellBot.sendMessage \
5730+ ShellBot.forwardMessage \
5731+ ShellBot.sendPhoto \
5732+ ShellBot.sendAudio \
5733+ ShellBot.sendDocument \
5734+ ShellBot.sendSticker \
5735+ ShellBot.sendVideo \
5736+ ShellBot.sendVideoNote \
5737+ ShellBot.sendVoice \
5738+ ShellBot.sendLocation \
5739+ ShellBot.sendVenue \
5740+ ShellBot.sendContact \
5741+ ShellBot.sendChatAction \
5742+ ShellBot.getUserProfilePhotos \
5743+ ShellBot.getFile \
5744+ ShellBot.kickChatMember \
5745+ ShellBot.leaveChat \
5746+ ShellBot.unbanChatMember \
5747+ ShellBot.getChat \
5748+ ShellBot.getChatAdministrators \
5749+ ShellBot.getChatMembersCount \
5750+ ShellBot.getChatMember \
5751+ ShellBot.editMessageText \
5752+ ShellBot.editMessageCaption \
5753+ ShellBot.editMessageReplyMarkup \
5754+ ShellBot.InlineKeyboardMarkup \
5755+ ShellBot.InlineKeyboardButton \
5756+ ShellBot.answerCallbackQuery \
5757+ ShellBot.deleteMessage \
5758+ ShellBot.exportChatInviteLink \
5759+ ShellBot.setChatPhoto \
5760+ ShellBot.deleteChatPhoto \
5761+ ShellBot.setChatTitle \
5762+ ShellBot.setChatDescription \
5763+ ShellBot.pinChatMessage \
5764+ ShellBot.unpinChatMessage \
5765+ ShellBot.promoteChatMember \
5766+ ShellBot.restrictChatMember \
5767+ ShellBot.getStickerSet \
5768+ ShellBot.uploadStickerFile \
5769+ ShellBot.createNewStickerSet \
5770+ ShellBot.addStickerToSet \
5771+ ShellBot.setStickerPositionInSet \
5772+ ShellBot.deleteStickerFromSet \
5773+ ShellBot.stickerMaskPosition \
5774+ ShellBot.downloadFile \
5775+ ShellBot.editMessageLiveLocation \
5776+ ShellBot.stopMessageLiveLocation \
5777+ ShellBot.setChatStickerSet \
5778+ ShellBot.deleteChatStickerSet \
5779+ ShellBot.sendMediaGroup \
5780+ ShellBot.editMessageMedia \
5781+ ShellBot.inputMedia \
5782+ ShellBot.sendAnimation \
5783+ ShellBot.answerInlineQuery \
5784+ ShellBot.InlineQueryResult \
5785+ ShellBot.InputMessageContent \
5786+ ShellBot.ChatPermissions \
5787+ ShellBot.setChatPermissions \
5788+ ShellBot.setChatAdministratorCustomTitle \
5789+ ShellBot.setMessageRules \
5790+ ShellBot.manageRules \
57515791 ShellBot.getUpdates
57525792
57535793 offset= ${_BOT_FLUSH_: +$(FlushOffset)} # flush
0 commit comments