From d082a2d7d958a02410d0913ed2a3da8acd73acc3 Mon Sep 17 00:00:00 2001 From: GochoMugo Date: Fri, 26 May 2017 18:20:29 +0300 Subject: [PATCH] src/telegram: Sort the message types for less cognitive load --- src/telegram.js | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/src/telegram.js b/src/telegram.js index 8ccae19..48f74e2 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -20,11 +20,30 @@ const pump = require('pump'); const deprecate = require('depd')('node-telegram-bot-api'); const _messageTypes = [ - 'text', 'audio', 'document', 'photo', 'sticker', 'video', 'voice', 'contact', - 'location', 'new_chat_members', 'left_chat_member', 'new_chat_title', - 'new_chat_photo', 'delete_chat_photo', 'group_chat_created', 'game', 'pinned_message', - 'migrate_from_chat_id', 'migrate_to_chat_id', 'channel_chat_created', 'supergroup_chat_created', - 'successful_payment', 'invoice', 'video_note' + 'audio', + 'channel_chat_created', + 'contact', + 'delete_chat_photo', + 'document', + 'game', + 'group_chat_created', + 'invoice', + 'left_chat_member', + 'location', + 'migrate_from_chat_id', + 'migrate_to_chat_id', + 'new_chat_members', + 'new_chat_photo', + 'new_chat_title', + 'photo', + 'pinned_message', + 'sticker', + 'successful_payment', + 'supergroup_chat_created', + 'text', + 'video', + 'video_note', + 'voice', ]; const _deprecatedMessageTypes = [ 'new_chat_participant', 'left_chat_participant'