mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-28 21:07:39 +00:00
[pr] PR #169: Merge branch 'pr/169'
This commit is contained in:
commit
306b492ebf
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user