feat: abstract method run

This commit is contained in:
def 2023-01-10 17:29:58 +04:00
parent f0d8e55da5
commit 063e25e578
2 changed files with 5 additions and 1 deletions

View file

@ -7,3 +7,7 @@ class AbstractSourcePlatform(ABC):
@abstractmethod
def get_user_information(self) -> User:
"""Init tables in database"""
@abstractmethod
def run(self) -> None:
"""Platform launch"""

View file

@ -14,7 +14,7 @@ class Telegram(AbstractSourcePlatform):
self.dispatcher = telegram.Dispatcher(bot=self.bot)
self.dispatcher.register_message_handler(self.on_message)
async def run(self):
async def run(self) -> None:
await self.dispatcher.start_polling()
async def on_message(self, msg):