Skip to content

Commit

Permalink
🐛 Use v13 signature for error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jh0ker committed Dec 7, 2022
1 parent 961a9ce commit f16bf31
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@


import logging
from telegram import Update
from telegram.ext import CallbackContext

from internationalization import _, __
from mwt import MWT
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit f16bf31

Please sign in to comment.