asafespace/logic.py
def leave_command(bot, user):
    """
    Unregistered the user from the database.

    Parameters
    ----------
    bot: Telegram both object
    user: dic
        Represents a user
    """

    try:
        remove_user(user["hashid"])
        chat_id = user["chat_id"]
        bot.send_message(chat_id=chat_id, text=LEAVE_SUCCESS_MESSAGE)
        logger.info("User is now unregistered.")
    except Exception as error:
        bot.send_message(chat_id=chat_id, text=LEAVE_FAILURE_MESSAGE)
        logger.error("User have not been removed due to an error. " + str(error))

    Unregistered the user from the database.

    Parameters
    ----------
    bot: Telegram both object
    user: dic
        Represents a user
    
Unregistered the user from the database.
Parameters

Telegram both object
user: dic
Represents a user
Unregistered the user from the database . Parameters Telegram both object user : dic Represents a user
def leave_command(bot, user):
    try:
        remove_user(user["hashid"])
        chat_id = user["chat_id"]
        bot.send_message(chat_id=chat_id, text=LEAVE_SUCCESS_MESSAGE)
        logger.info("User is now unregistered.")
    except Exception as error:
        bot.send_message(chat_id=chat_id, text=LEAVE_FAILURE_MESSAGE)
        logger.error("User have not been removed due to an error. " + str(error))
def leave_command ( bot , user ) : try : remove_user ( user [ "hashid" ] ) chat_id = user [ "chat_id" ] bot . send_message ( chat_id = chat_id , text = LEAVE_SUCCESS_MESSAGE ) logger . info ( "User is now unregistered." ) except Exception as error : bot . send_message ( chat_id = chat_id , text = LEAVE_FAILURE_MESSAGE ) logger . error ( "User have not been removed due to an error. " + str ( error ) )
Unregistered the user from the database.
Unregistered the user from the database .
"""
    Unregistered the user from the database.

    Parameters
    ----------
    bot: Telegram both object
    user: dic
        Represents a user
    """
bot
user