feat: abstract method run
This commit is contained in:
parent
f0d8e55da5
commit
063e25e578
|
@ -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"""
|
||||
|
|
|
@ -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):
|
||||
|
|
Reference in a new issue