Fixed @here command

This commit is contained in:
Alexandr
2018-03-05 12:14:20 +01:00
parent 4cb4ff11e4
commit 21a73e9fa6

View File

@ -76,9 +76,8 @@ class MessageWorker:
self.send(id=conf_id, msg=msg + ' ```')
return True
first, *middle, last = msg['message']['text'].split()
if first == '@here' or last == '@here':
if msg['message']['text'][:5] == '@here' or \
msg['message']['text'][5:] == '@here':
conf_id = msg['message']['chat']['id']
user_id = msg['message']['from']['id']
chat_title = msg['message']['chat']['title']