diff --git a/django_telegrambot/apps.py b/django_telegrambot/apps.py index 4e580b3..794677a 100644 --- a/django_telegrambot/apps.py +++ b/django_telegrambot/apps.py @@ -24,7 +24,7 @@ class DjangoTelegramBot(AppConfig): @classmethod def getDispatcher(cls, id = None, safe=True): if id == None: - return dispatchers[0] + return cls.dispatchers[0] else: try: index = cls.bot_tokens.index(id) @@ -39,7 +39,7 @@ def getDispatcher(cls, id = None, safe=True): @classmethod def getBot(cls, id = None, safe = True): if id == None: - return bots[0] + return cls.bots[0] else: try: index = cls.bot_tokens.index(id)