Skip to content

Instantly share code, notes, and snippets.

@dodopontocom
Created July 13, 2019 01:39
Show Gist options
  • Save dodopontocom/7c08914ec99e503149466e8ec231a1bf to your computer and use it in GitHub Desktop.
Save dodopontocom/7c08914ec99e503149466e8ec231a1bf to your computer and use it in GitHub Desktop.
#!/bin/bash
#
#❌
#✅
#✖
checked='◻️'
#🆗 ️
cron._unchecked() {
local message_id btn_type btn_list dias dias_checked
dias=('◻️Seg' '◻️Ter' '◻️Qua' '◻️Qui' '◻️Sex' '◻️Sab' '◻️Dom')
dias_checked=('🆗Seg' '🆗Ter' '🆗Qua' '🆗Qui' '🆗Sex' '🆗Sab' '🆗Dom')
btn_list=('Seg' 'Ter' 'Qua' 'Qui' 'Sex' 'Sab' 'Dom')
btn_type=$callback_query_data
ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} --text "test"
#ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} --text "*test2*" --parse_mode markdown
ShellBot.editMessageReplyMarkup --chat_id ${callback_query_message_chat_id[$id]} \
--message_id ${callback_query_message_message_id} \
--reply_markup "$keyboard_cron_checked"
}
cron._checked() {
local message_id btn_type btn_list dias dias_checked
dias=('◻️Seg' '◻️Ter' '◻️Qua' '◻️Qui' '◻️Sex' '◻️Sab' '◻️Dom')
dias_checked=('🆗Seg' '🆗Ter' '🆗Qua' '🆗Qui' '🆗Sex' '🆗Sab' '🆗Dom')
btn_list=('Seg' 'Ter' 'Qua' 'Qui' 'Sex' 'Sab' 'Dom')
btn_type=$callback_query_data
ShellBot.answerCallbackQuery --callback_query_id ${callback_query_id[$id]} --text "test"
#ShellBot.sendMessage --chat_id ${callback_query_message_chat_id[$id]} --text "*test2*" --parse_mode markdown
ShellBot.editMessageReplyMarkup --chat_id ${callback_query_message_chat_id[$id]} \
--message_id ${callback_query_message_message_id} \
--reply_markup "$keyboard_cron"
}
############### unchecked #######################################
botao=''
dias=('◻️Seg' '◻️Ter' '◻️Qua' '◻️Qui' '◻️Sex' '◻️Sab' '◻️Dom')
ShellBot.InlineKeyboardButton --button 'botao' --line 1 --text "${dias[0]}" --callback_data 'Seg'
ShellBot.InlineKeyboardButton --button 'botao' --line 1 --text "${dias[1]}" --callback_data 'Ter'
ShellBot.InlineKeyboardButton --button 'botao' --line 1 --text "${dias[2]}" --callback_data 'Qua'
ShellBot.InlineKeyboardButton --button 'botao' --line 2 --text "${dias[3]}" --callback_data 'Qui'
ShellBot.InlineKeyboardButton --button 'botao' --line 2 --text "${dias[4]}" --callback_data 'Sex'
ShellBot.InlineKeyboardButton --button 'botao' --line 2 --text "${dias[5]}" --callback_data 'Sab'
ShellBot.InlineKeyboardButton --button 'botao' --line 3 --text "${dias[6]}" --callback_data 'Dom'
ShellBot.regHandleFunction --function cron._unchecked --callback_data Seg
ShellBot.regHandleFunction --function cron._unchecked --callback_data Ter
ShellBot.regHandleFunction --function cron._unchecked --callback_data Qua
ShellBot.regHandleFunction --function cron._unchecked --callback_data Qui
ShellBot.regHandleFunction --function cron._unchecked --callback_data Sex
ShellBot.regHandleFunction --function cron._unchecked --callback_data Sab
ShellBot.regHandleFunction --function cron._unchecked --callback_data Dom
keyboard_cron="$(ShellBot.InlineKeyboardMarkup -b 'botao')"
#######################################################################################
############### checked #######################################
botao1=''
dias=('🆗Seg' '🆗Ter' '🆗Qua' '🆗Qui' '🆗Sex' '🆗Sab' '🆗Dom')
ShellBot.InlineKeyboardButton --button 'botao1' --line 1 --text "${dias[0]}" --callback_data 'Seg_checked'
ShellBot.InlineKeyboardButton --button 'botao1' --line 1 --text "${dias[1]}" --callback_data 'Ter_checked'
ShellBot.InlineKeyboardButton --button 'botao1' --line 1 --text "${dias[2]}" --callback_data 'Qua_checked'
ShellBot.InlineKeyboardButton --button 'botao1' --line 2 --text "${dias[3]}" --callback_data 'Qui_checked'
ShellBot.InlineKeyboardButton --button 'botao1' --line 2 --text "${dias[4]}" --callback_data 'Sex_checked'
ShellBot.InlineKeyboardButton --button 'botao1' --line 2 --text "${dias[5]}" --callback_data 'Sab_checked'
ShellBot.InlineKeyboardButton --button 'botao1' --line 3 --text "${dias[6]}" --callback_data 'Dom_checked'
ShellBot.regHandleFunction --function cron._checked --callback_data Seg_checked
ShellBot.regHandleFunction --function cron._checked --callback_data Ter_checked
ShellBot.regHandleFunction --function cron._checked --callback_data Qua_checked
ShellBot.regHandleFunction --function cron._checked --callback_data Qui_checked
ShellBot.regHandleFunction --function cron._checked --callback_data Sex_checked
ShellBot.regHandleFunction --function cron._checked --callback_data Sab_checked
ShellBot.regHandleFunction --function cron._checked --callback_data Dom_checked
keyboard_cron_checked="$(ShellBot.InlineKeyboardMarkup -b 'botao1')"
#######################################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment