pooling update handlers, add overlay bot module
This commit is contained in:
@@ -23,10 +23,11 @@ class TelegramBot(models.Model):
|
||||
def get_bot(self):
|
||||
return Bot(self.bot_token)
|
||||
|
||||
def build_dispatcher(self):
|
||||
def build_dispatcher(self, error_handler):
|
||||
bot = self.get_bot()
|
||||
bot.get_me()
|
||||
dispatcher = Dispatcher(bot, None, workers=0, use_context=True)
|
||||
dispatcher.add_error_handler(error_handler)
|
||||
self.config.build_dispatcher(dispatcher)
|
||||
return dispatcher
|
||||
|
||||
|
Reference in New Issue
Block a user