mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +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:
commit
2b5dfe0e84
@ -101,10 +101,10 @@ class TelegramBot extends EventEmitter {
|
|||||||
if (message.text) {
|
if (message.text) {
|
||||||
debug('Text message');
|
debug('Text message');
|
||||||
this.textRegexpCallbacks.some(reg => {
|
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);
|
const result = reg.regexp.exec(message.text);
|
||||||
if (result) {
|
if (result) {
|
||||||
debug('Matches', reg.regexp);
|
debug('Matches %s', reg.regexp);
|
||||||
reg.callback(message, result);
|
reg.callback(message, result);
|
||||||
// returning truthy value exits .some
|
// returning truthy value exits .some
|
||||||
return this.options.onlyFirstMatch;
|
return this.options.onlyFirstMatch;
|
||||||
|
@ -60,7 +60,7 @@ class TelegramBotWebHook {
|
|||||||
|
|
||||||
// bound req listener
|
// bound req listener
|
||||||
_requestListener = (req, res) => {
|
_requestListener = (req, res) => {
|
||||||
debug('WebHook request URL:', req.url);
|
debug('WebHook request URL: %s', req.url);
|
||||||
debug('WebHook request headers: %j', req.headers);
|
debug('WebHook request headers: %j', req.headers);
|
||||||
|
|
||||||
// If there isn't token on URL
|
// If there isn't token on URL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user