2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-28 21:07:39 +00:00

[pr] Merge branch 'fix-debug-prints' of https://github.com/oflisback/node-telegram-bot-api into pr-169

This commit is contained in:
GochoMugo 2016-11-10 17:31:33 +03:00
commit 2b5dfe0e84
No known key found for this signature in database
GPG Key ID: 7B6A01CB57AA39E4
2 changed files with 3 additions and 3 deletions

View File

@ -101,10 +101,10 @@ class TelegramBot extends EventEmitter {
if (message.text) {
debug('Text message');
this.textRegexpCallbacks.some(reg => {
debug('Matching %s whith', message.text, reg.regexp);
debug('Matching %s with %s', message.text, reg.regexp);
const result = reg.regexp.exec(message.text);
if (result) {
debug('Matches', reg.regexp);
debug('Matches %s', reg.regexp);
reg.callback(message, result);
// returning truthy value exits .some
return this.options.onlyFirstMatch;

View File

@ -60,7 +60,7 @@ class TelegramBotWebHook {
// bound req listener
_requestListener = (req, res) => {
debug('WebHook request URL:', req.url);
debug('WebHook request URL: %s', req.url);
debug('WebHook request headers: %j', req.headers);
// If there isn't token on URL