Skip to content

Commit 4216157

Browse files
committed
Check command
1 parent f7d35dc commit 4216157

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bot/osmbot_blueprint.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ def attend_webhook(token):
8282
osmbot.set_group(query['message']['chat']['type'] == u'group')
8383
if osmbot.get_group():
8484
identifier = message_dict['chat']['id']
85-
command = message_dict["text"].split()[0]
85+
if "text" in message_dict:
86+
command = message_dict["text"].split()[0]
87+
else:
88+
command = None
8689
else:
8790
identifier = message_dict['from']['id']
8891
if "text" in message_dict:

0 commit comments

Comments
 (0)