Created
November 3, 2016 03:40
-
-
Save nesffer/73f98bd1eda6ef36a23d37f975b68fff to your computer and use it in GitHub Desktop.
bot.ping.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bot.onText(/^(ping|핑)[!]?$/i, (msg, match) => { | |
var messageId = msg.message_id; | |
var chatId = msg.chat.id; | |
if (match[1].match(/ping/i)) { | |
bot.sendMessage(chatId, 'Ping!', {reply_to_message_id: messageId}); | |
} else if (match[1].match(/핑/)) { | |
bot.sendMessage(chatId, '퐁!', {reply_to_message_id: messageId}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment