Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "tgb", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "The best choice for your Telegram Bots", | ||
@@ -5,0 +5,0 @@ "homepage": "https://666.io", |
@@ -41,3 +41,3 @@ [![Codacy][cod_b]][cod_l] | ||
const bot = tgb(process.env.TELEGRAM_BOT_TOKEN); | ||
const token = process.env.TELEGRAM_BOT_TOKEN; | ||
const {polling, entities} = tgb; | ||
@@ -47,6 +47,6 @@ | ||
polling(bot, function({message}, bot) { | ||
bot.sendMessage([message.from.id, entities(message)]); | ||
polling(token, function({message}, bot) { | ||
bot.sendMessage([message.from.id, entities(message) || "empty"]); | ||
}).catch(function(error) { | ||
if(error.code === bot.ERR_INVALID_TOKEN) { | ||
if(error.code === tgb.ERR_INVALID_TOKEN) { | ||
this.stop(); | ||
@@ -66,3 +66,3 @@ console.log("There's a problem with the token..."); | ||
// tgb.polling(token, options{limit, timeout, interval}, onMsg(data, bot)); | ||
// tgb.polling(bot, ...); | ||
// tgb.polling(bot, onMsg(data)); | ||
@@ -190,3 +190,3 @@ // https://core.telegram.org/bots/api#getupdates | ||
[bot_command/start, hashtag#win, message[...]] | ||
[message[...], bot_command/start, hashtag#win] | ||
@@ -453,3 +453,3 @@ ^---| The Spy calls only the first available scope | ||
"text": "NANI?!" | ||
}).inlineLink("Omae wa ... mou shindeiru ", "db.gg")); | ||
}).inlineLink("Omae wa ... mou shindeiru", "db.gg")); | ||
@@ -456,0 +456,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87853
22
2226
6