File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1+ import functools
12import peewee
23from telegram import InlineKeyboardButton , InlineKeyboardMarkup
34from telegram .ext import CommandHandler , CallbackQueryHandler
89from pycamp_bot .logger import logger
910
1011
11- def vote_authorized (f ):
12- def wrap (* args , ** kargs ):
12+ def vote_authorized (func ):
13+ @functools .wraps (func )
14+ async def wrap (* args ):
1315 logger .info ('Vote authorized wrapper' )
1416
1517 update , context = args
1618 is_active , pycamp = get_active_pycamp ()
1719 if pycamp .vote_authorized :
18- f ( * args )
20+ await func ( update , context )
1921 else :
2022 context .bot .send_message (
2123 chat_id = update .message .chat_id ,
22- text = "La eleccion no está autorizada. Avisale a un admin\
23- (/admins)!" )
24+ text = "La eleccion no está autorizada. Avisale a un admin (/admins)!" )
2425 return wrap
2526
2627
You can’t perform that action at this time.
0 commit comments