localhost_contrib #2
|
@ -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