Skip to content

Commit

Permalink
examples: Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
passion-27 committed Jan 29, 2017
1 parent 78af285 commit 78a0de3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions examples/herokuWebHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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!');
});
2 changes: 1 addition & 1 deletion examples/httpsWebHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
});
2 changes: 1 addition & 1 deletion examples/openShiftWebHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
});

0 comments on commit 78a0de3

Please sign in to comment.