Skip to content

Commit

Permalink
Bot config_handlers with commands modules
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigondec committed Oct 5, 2019
1 parent 110d9ce commit 82c0b11
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions bot.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
from core import BotTelegramCore
from mixins import (BaseCommandsBotMixin, CallbackBotMixin, ErrorBotMixin,
MessageBotMixin, StickerBotMixin)
from commands import handlers


class JerimumBot(CallbackBotMixin, ErrorBotMixin,
MessageBotMixin, StickerBotMixin):
class JerimumBot(BotTelegramCore):
"""Bot Controller"""

def config_handlers(self):
for BaseClass in self.__class__.__bases__:
assert issubclass(BaseClass, BotTelegramCore)
BaseClass.config_handlers(self)
for handler in handlers:
handler(self)
for config_handler in handlers:
config_handler(self)

0 comments on commit 82c0b11

Please sign in to comment.