mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-28 12:57:38 +00:00
examples: Minor cleanup
This commit is contained in:
parent
3ed45fb624
commit
24a3f6dade
@ -6,11 +6,10 @@
|
||||
|
||||
const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
|
||||
const TelegramBot = require('..');
|
||||
|
||||
const options = {
|
||||
webHook: {
|
||||
//Port which you should bind to is assigned to $PORT variable
|
||||
//See: https://devcenter.heroku.com/articles/dynos#local-environment-variables
|
||||
// Port to which you should bind is assigned to $PORT variable
|
||||
// See: https://devcenter.heroku.com/articles/dynos#local-environment-variables
|
||||
port: process.env.PORT
|
||||
// you do NOT need to set up certificates since Heroku provides
|
||||
// the SSL certs already (https://<app-name>.herokuapp.com)
|
||||
@ -32,5 +31,5 @@ bot.setWebHook(`${url}/bot${TOKEN}`);
|
||||
|
||||
// Just to ping!
|
||||
bot.on('message', function onMessage(msg) {
|
||||
bot.sendMessage(msg.chat.id, 'Running on Heroku!');
|
||||
bot.sendMessage(msg.chat.id, 'I am alive on Heroku!');
|
||||
});
|
||||
|
@ -26,5 +26,5 @@ bot.setWebHook(`${url}/bot${TOKEN}`, {
|
||||
|
||||
// Just to ping!
|
||||
bot.on('message', function onMessage(msg) {
|
||||
bot.sendMessage(msg.chat.id, "I'm alive!");
|
||||
bot.sendMessage(msg.chat.id, 'I am alive!');
|
||||
});
|
||||
|
@ -28,5 +28,5 @@ bot.setWebHook(`${url}/bot${TOKEN}`);
|
||||
|
||||
// Just to ping!
|
||||
bot.on('message', function onMessage(msg) {
|
||||
bot.sendMessage(msg.chat.id, "I'm alive on OpenShift!");
|
||||
bot.sendMessage(msg.chat.id, 'I am alive on OpenShift!');
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user