aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2016-05-25 17:37:09 +0200
committerRahiel Kasim <rahielkasim@gmail.com>2016-05-25 17:37:09 +0200
commitdb5016be6db2a92f2b9f3e9e3e5723e3baa92873 (patch)
treed49555cb4a5687a3389c005e05bcbedae2159ce7
parent3e3f455f67c5ce4ff46b27684555d6f41ebf6d8a (diff)
hotfix and update readme
-rw-r--r--README.md11
-rw-r--r--bismillah.py2
2 files changed, 8 insertions, 5 deletions
diff --git a/README.md b/README.md
index 69c977c..9fcc924 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+# BismillahBot
+
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
BismillahBot is a bot on telegram to explore the Qur'an.
@@ -24,13 +26,12 @@ The bot can be used by messaging
You can run your own instance of BismillahBot. First you need to request a
[bot username and token](https://core.telegram.org/bots#3-how-do-i-create-a-bot).
-You also need a Unix system to run the bot on. BismillahBot is running on a
-[DigitalOcean droplet](https://www.digitalocean.com/?refcode=8b7b76e3230d)
-(referral link) running Ubuntu. The following gets the code, and installs the
-dependencies on Ubuntu:
+You also need a Unix-like system to run the bot on. BismillahBot is running on a
+Debian server. The following gets the code, and installs the dependencies on
+Debian/Ubuntu:
```bash
-sudo apt-get install redis-server git python-pip
+sudo apt install redis-server git python-pip python-dev
git clone https://github.com/rahiel/BismillahBot.git
cd BismillahBot/
pip install -r requirements.txt
diff --git a/bismillah.py b/bismillah.py
index 22632f9..aa2023c 100644
--- a/bismillah.py
+++ b/bismillah.py
@@ -134,6 +134,8 @@ def serve(bot, update_id, data):
upload_from_disk()
for update in bot.getUpdates(offset=update_id, timeout=10):
+ if not update.message: # weird Telegram update with only an update_id
+ continue
chat_id = update.message.chat_id
update_id = update.update_id + 1
message = update.message.text.encode("utf-8").lower()