From f16bf317b5ff318147a6d69db0e94b45f39b5c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Wed, 7 Dec 2022 14:06:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Use=20v13=20signature=20for=20er?= =?UTF-8?q?ror=20handler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils.py b/utils.py index 20768a55..88ca5a51 100644 --- a/utils.py +++ b/utils.py @@ -19,6 +19,8 @@ import logging +from telegram import Update +from telegram.ext import CallbackContext from internationalization import _, __ from mwt import MWT @@ -73,11 +75,11 @@ def display_color_group(color, game): if color == "y": return __("{emoji} Yellow", game.translate).format( emoji='💛') - -def error(bot, update, error): + +def error(update: Update, context: CallbackContext): """Simple error handler""" - logger.exception(error) + logger.exception(context.error) def send_async(bot, *args, **kwargs):