def process_update(obj, update):
if isinstance(update, TelegramError):
obj.dispatch_error(None, update)
else:
for group in obj.groups:
for handler in obj.handlers[group]:
try:
if handler.check_update(update):
handler.handle_update(update, obj)
except Exception as e:
try:
obj.dispatch_error(update, e)
except Exception:
obj.logger.exception(
'An uncaught error was raised while '
'handling the error')
评论列表
文章目录