asafespace/utilities.py
def extract_chat_id(body):
    """
    Obtains the chat ID from the event body

    Parameters
    ----------
    body: dic
        Body of webhook event
    
    Returns
    -------
    int
        Chat ID of user
    """

    if "edited_message" in body.keys():
        chat_id = body["edited_message"]["chat"]["id"]
    else:
        chat_id = body["message"]["chat"]["id"]
    return chat_id

    Obtains the chat ID from the event body

    Parameters
    ----------
    body: dic
        Body of webhook event
    
    Returns
    -------
    int
        Chat ID of user
    
Obtains the chat ID from the event body
Parameters

dic
Body of webhook event

Returns

int
Chat ID of user
Obtains the chat ID from the event body Parameters dic Body of webhook event Returns int Chat ID of user
def extract_chat_id(body):
    if "edited_message" in body.keys():
        chat_id = body["edited_message"]["chat"]["id"]
    else:
        chat_id = body["message"]["chat"]["id"]
    return chat_id
def extract_chat_id ( body ) : if "edited_message" in body . keys ( ) : chat_id = body [ "edited_message" ] [ "chat" ] [ "id" ] else : chat_id = body [ "message" ] [ "chat" ] [ "id" ] return chat_id
Obtains the chat ID from the event body
Parameters
Obtains the chat ID from the event body Parameters
"""
    Obtains the chat ID from the event body

    Parameters
    ----------
    body: dic
        Body of webhook event
    
    Returns
    -------
    int
        Chat ID of user
    """
body