diff options
Diffstat (limited to 'telegrambot.py')
-rw-r--r-- | telegrambot.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/telegrambot.py b/telegrambot.py index 061c41c..774da0a 100644 --- a/telegrambot.py +++ b/telegrambot.py @@ -24,7 +24,7 @@ class TGBot(): self._updater = Updater(token=config.API_TOKEN) self._dispatcher = self._updater.dispatcher self._dispatcher.add_handler(CommandHandler('start', _onStart)) - self._dispatcher.add_handler(MessageHandler(Filters.text, self._onText)) + self._dispatcher.add_handler(MessageHandler(Filters.update, self._onText)) self.texthandlers = [] def run(self): @@ -39,7 +39,7 @@ class TGBot(): if chat_id != config.CHAT_ID: return for handler in self.texthandlers: - handler(update.message.text) + handler(update) def send(self, text): self._updater.bot.send_message( |