From 76e96c05a1651996a207bc0f85b3f7552b2b3f93 Mon Sep 17 00:00:00 2001 From: Ignacio Iglesias Date: Fri, 18 Mar 2016 01:34:05 +0100 Subject: [PATCH 1/2] Added Markdown support for telegram-bot-bash --- bashbot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashbot.sh b/bashbot.sh index a4b8d1e..66d0198 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -60,7 +60,7 @@ send_message() { fi if [ "$sent" != "y" ];then - res=$(curl -s "$MSG_URL" -F "chat_id=$chat" -F "text=$text") + res=$(curl -s "$MSG_URL" -F "chat_id=$chat" -F "text=$text" -F "parse_mode=markdown") fi } From 4d2a6a6de21c219374d5f7b652eb2bbaad0ab2bc Mon Sep 17 00:00:00 2001 From: Ignacio Iglesias Date: Sat, 19 Mar 2016 02:08:25 +0100 Subject: [PATCH 2/2] Separated markdown sendmessage --- bashbot.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bashbot.sh b/bashbot.sh index 66d0198..9b900fa 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -60,11 +60,15 @@ send_message() { fi if [ "$sent" != "y" ];then - res=$(curl -s "$MSG_URL" -F "chat_id=$chat" -F "text=$text" -F "parse_mode=markdown") + res=$(curl -s "$MSG_URL" -F "chat_id=$chat" -F "text=$text") fi } +send_markdown_message() { + res=$(curl -s "$MSG_URL" -F "chat_id=$1" -F "text=$2" -F "parse_mode=markdown") +} + send_keyboard() { local chat="$1" local text="$2"