From 0efec7dce186443fd74d27fba50fd750328b2a29 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 13 May 2016 17:45:56 +0200 Subject: [PATCH] Fixed bugs --- .gitignore | 1 + README.md | 2 +- bashbot.sh | 2 +- commands.sh | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 239db4b..9e00ce7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ count +token diff --git a/README.md b/README.md index a7146b8..d7bbbbb 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Clone the repository: git clone --recursive https://github.com/topkecleon/telegram-bot-bash ``` -Paste the token on line 9 of commands.sh (instead of tokenhere). +Create a file called token and paste the token in there. Then start editing the commands. ### Receive data diff --git a/bashbot.sh b/bashbot.sh index 6a97999..46d5eb9 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -11,7 +11,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) -if [ ! -d "JSON.sh" ]; then +if [ ! -f "JSON.sh/JSON.sh" ]; then echo "You did not clone recursively! Downloading JSON.sh..." git clone http://github.com/dominictarr/JSON.sh echo "JSON.sh has been downloaded. Proceeding." diff --git a/commands.sh b/commands.sh index aa5856a..380e4e4 100755 --- a/commands.sh +++ b/commands.sh @@ -5,8 +5,8 @@ # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) if [ "$1" = "source" ];then - # Edit the token in here - TOKEN='tokenhere' + # Place the token in the token file + TOKEN=$(cat token) # Set INLINE to 1 in order to receive inline queries. # To enable this option in your bot, send the /setinline command to @BotFather. INLINE=0