aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2016-05-25 17:50:31 +0200
committerRahiel Kasim <rahielkasim@gmail.com>2016-05-25 17:50:31 +0200
commit43a65e1a5d0a749411cae71a31c071d3f03d68a0 (patch)
treedfa44b7f1d154a16d36fbd58dbdd10a33614e4b3
parentdb5016be6db2a92f2b9f3e9e3e5723e3baa92873 (diff)
skip over weird updates
-rw-r--r--bismillah.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bismillah.py b/bismillah.py
index aa2023c..0a85569 100644
--- a/bismillah.py
+++ b/bismillah.py
@@ -134,10 +134,10 @@ def serve(bot, update_id, data):
upload_from_disk()
for update in bot.getUpdates(offset=update_id, timeout=10):
+ update_id = update.update_id + 1
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()
state = get_user(chat_id)
if state is not None: