those error messages are a bit universal.
This commit is contained in:
parent
faaf8ac5f4
commit
6757e62242
|
@ -18,7 +18,8 @@ class TelegramBot(Bot):
|
||||||
updates = tb.get_updates().wait()
|
updates = tb.get_updates().wait()
|
||||||
reports = []
|
reports = []
|
||||||
for update in updates:
|
for update in updates:
|
||||||
try:
|
if update == 404:
|
||||||
|
return reports
|
||||||
user.save_seen_tg(update.update_id)
|
user.save_seen_tg(update.update_id)
|
||||||
if update.message.text.lower() == "/start":
|
if update.message.text.lower() == "/start":
|
||||||
user.add_telegram_subscribers(update.message.sender.id)
|
user.add_telegram_subscribers(update.message.sender.id)
|
||||||
|
@ -34,9 +35,6 @@ class TelegramBot(Bot):
|
||||||
else:
|
else:
|
||||||
reports.append(Report(update.message.sender.username, self,
|
reports.append(Report(update.message.sender.username, self,
|
||||||
update.message.text, None, update.message.date))
|
update.message.text, None, update.message.date))
|
||||||
except AttributeError:
|
|
||||||
logger.error('Some Attribute Error. ', exc_info=True)
|
|
||||||
return reports
|
|
||||||
return reports
|
return reports
|
||||||
|
|
||||||
def post(self, user, report):
|
def post(self, user, report):
|
||||||
|
|
Loading…
Reference in a new issue