handler.py
def contact_handler(bot, update):
    '''
    Handler for the messages with contacts
    '''
    username = str(update['message']['chat']['id'])
    user_to_follow = str(update['message']['contact']['user_id'])
    if  not update['message']['contact']['user_id']:
        bot.send_message(username, RESPONSES['empty_contact'])
        return
    
    new_follower = follow_user(username, user_to_follow, table)
    if new_follower:
        bot.send_message(user_to_follow, RESPONSES['new_follower'])
    logger.info('contat_handler')

    Handler for the messages with contacts
    
Handler for the messages with contacts
Handler for the messages with contacts
def contact_handler(bot, update):
    username = str(update['message']['chat']['id'])
    user_to_follow = str(update['message']['contact']['user_id'])
    if  not update['message']['contact']['user_id']:
        bot.send_message(username, RESPONSES['empty_contact'])
        return
    new_follower = follow_user(username, user_to_follow, table)
    if new_follower:
        bot.send_message(user_to_follow, RESPONSES['new_follower'])
    logger.info('contat_handler')
def contact_handler ( bot , update ) : username = str ( update [ 'message' ] [ 'chat' ] [ 'id' ] ) user_to_follow = str ( update [ 'message' ] [ 'contact' ] [ 'user_id' ] ) if not update [ 'message' ] [ 'contact' ] [ 'user_id' ] : bot . send_message ( username , RESPONSES [ 'empty_contact' ] ) return new_follower = follow_user ( username , user_to_follow , table ) if new_follower : bot . send_message ( user_to_follow , RESPONSES [ 'new_follower' ] ) logger . info ( 'contat_handler' )
Handler for the messages with contacts
Handler for the messages with contacts
'''
    Handler for the messages with contacts
    '''
bot
update