Hot fix telegram watcher. No message in results

This commit is contained in:
Reckless_Satoshi 2022-03-01 05:56:37 -08:00
parent 4d2cf584eb
commit b70679a7b7
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -31,7 +31,12 @@ class Command(BaseCommand):
if len(list(response['result'])) == 0:
continue
for result in response['result']:
text = result['message']['text']
try: # if there is no key message, skips this result.
text = result['message']['text']
except:
continue
splitted_text = text.split(' ')
if splitted_text[0] == '/start':
token = splitted_text[-1]