lib/basic.js
function getUpdateInfo(update) {
    /** Is it chosen inline or edited message/post */
    let isChosen = false;
    let isEdited = false;

    /** Raw and formatted names of update */
    let original = '';
    let name = '';

    if (update.message) {
        name = 'message';
        original = 'message';
    } else if (update.edited_message) {
        isEdited = true;
        original = 'edited_message';
        name = 'message';
    } else if (update.channel_post) {
        original = 'channel_post';
        name = 'post';
    } else if (update.edited_channel_post) {
        isEdited = true;
        original = 'edited_channel_post';
        name = 'post';
    } else if (update.inline_query) {
        original = 'inline_query';
        name = 'inline';
    } else if (update.chosen_inline_result) {
        isChosen = true;
        original = 'chosen_inline_result';
        name = 'inline';
    } else if (update.callback_query) {
        original = 'callback_query';
        name = 'callback';
    }

    return { isChosen, isEdited, original, name };
}
function getUpdateInfo(update) {
    /** Is it chosen inline or edited message/post */
    let isChosen = false;
    let isEdited = false;

    /** Raw and formatted names of update */
    let original = '';
    let name = '';

    if (update.message) {
        name = 'message';
        original = 'message';
    } else if (update.edited_message) {
        isEdited = true;
        original = 'edited_message';
        name = 'message';
    } else if (update.channel_post) {
        original = 'channel_post';
        name = 'post';
    } else if (update.edited_channel_post) {
        isEdited = true;
        original = 'edited_channel_post';
        name = 'post';
    } else if (update.inline_query) {
        original = 'inline_query';
        name = 'inline';
    } else if (update.chosen_inline_result) {
        isChosen = true;
        original = 'chosen_inline_result';
        name = 'inline';
    } else if (update.callback_query) {
        original = 'callback_query';
        name = 'callback';
    }

    return { isChosen, isEdited, original, name };
}
Methods
@private
 
Returns info about raw updates from Telegram Bot API

@param  {Object} update - Raw incoming update
@return {Object}