2017-09-23 41 views

回答

0

我沒有找到回調的解決方案。我的解決方案:

def choosing_room(message): 
    ... 
    message = bot.send_message(message.chat.id, text=rooms_str) 
    bot.register_next_step_handler(message, room_selected) 

def room_selected(message): 
    photo_mess = bot.send_message(message.chat.id, text='Send photo') 
    # Use functools.partial 
    bot.register_next_step_handler(photo_mess, partial(add_player_photo, room_id)) 

def add_player_photo(room_id, message): 
    ...