diff --git a/src/telegram.js b/src/telegram.js index 7e353c2..9c5bba4 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -1609,7 +1609,7 @@ class TelegramBot extends EventEmitter { */ removeTextListener(regexp) { const index = this._textRegexpCallbacks.findIndex((textListener) => { - return textListener.regexp === regexp; + return String(textListener.regexp) === String(regexp); }); if (index === -1) { return null;