49
49
level = logging .INFO
50
50
)
51
51
logger = logging .getLogger (__name__ )
52
+ logging .getLogger ('apscheduler' ).setLevel (logging .WARNING )
52
53
53
54
@user_locale
54
55
def notify_me (update : Update , context : CallbackContext ):
@@ -302,12 +303,12 @@ def select_game(update: Update, context: CallbackContext):
302
303
def selected ():
303
304
back = [[InlineKeyboardButton (text = _ ("Back to last group" ),
304
305
switch_inline_query = '' )]]
305
- dispatcher . run_async ( context .bot .answerCallbackQuery , update .callback_query .id ,
306
+ context .bot .answerCallbackQuery ( update .callback_query .id ,
306
307
text = _ ("Please switch to the group you selected!" ),
307
308
show_alert = False ,
308
309
timeout = TIMEOUT )
309
310
310
- dispatcher . run_async ( context .bot .editMessageText , chat_id = update .callback_query .message .chat_id ,
311
+ context .bot .editMessageText ( chat_id = update .callback_query .message .chat_id ,
311
312
message_id = update .callback_query .message .message_id ,
312
313
text = _ ("Selected group: {group}\n "
313
314
"<b>Make sure that you switch to the correct "
@@ -317,7 +318,7 @@ def selected():
317
318
parse_mode = ParseMode .HTML ,
318
319
timeout = TIMEOUT )
319
320
320
- selected ( )
321
+ dispatcher . run_async ( selected )
321
322
322
323
323
324
@game_locales
@@ -385,16 +386,16 @@ def start_game(update: Update, context: CallbackContext):
385
386
def send_first ():
386
387
"""Send the first card and player"""
387
388
388
- dispatcher . run_async ( context .bot .sendSticker , chat .id ,
389
+ context .bot .sendSticker ( chat .id ,
389
390
sticker = c .STICKERS [str (game .last_card )],
390
391
timeout = TIMEOUT )
391
392
392
- dispatcher . run_async ( context .bot .sendMessage , chat .id ,
393
+ context .bot .sendMessage ( chat .id ,
393
394
text = first_message ,
394
395
reply_markup = InlineKeyboardMarkup (choice ),
395
396
timeout = TIMEOUT )
396
397
397
- send_first ( )
398
+ dispatcher . run_async ( send_first )
398
399
start_player_countdown (context .bot , game , context .job_queue )
399
400
400
401
elif len (context .args ) and context .args [0 ] == 'select' :
0 commit comments