send_message "${USER[ID]}""This is bashbot, the Telegram bot written entirely in bash."
;;
'/start')
send_message "${USER[ID]}""This is bashbot, the Telegram bot written entirely in bash.
Features background tasks and interactive chats.
Can serve as an interface for cli programs.
Currently can send, recieve and forward messages, custom keyboards, photos, audio, voice, documents, locations and video files.
Available commands:
/start: Start bot and get this message.
/info: Get shorter info message about this bot.
/question: Start interactive chat.
/cancel: Cancel any currently running interactive chats.
Written by @topkecleon, Juan Potato (@awkward_potato), Lorenzo Santina (BigNerd95) and Daniil Gentili (@danogentili)
Contribute to the project: https://github.com/topkecleon/telegram-bot-bash
"
;;
'/cancel')
if tmux ls | grep -q $copname;then killproc && send_message "${USER[ID]}""Command canceled.";else send_message "${USER[ID]}""No command is currently running.";fi
;;
*)
if tmux ls | grep -v send | grep -q $copname;then inproc;else send_message "${USER[ID]}""$MESSAGE""safe";fi