localhost_contrib #2

Closed
def wants to merge 4 commits from localhost_contrib into master
2 changed files with 5 additions and 1 deletions
Showing only changes of commit 063e25e578 - Show all commits

View file

@ -7,3 +7,7 @@ class AbstractSourcePlatform(ABC):
@abstractmethod @abstractmethod
def get_user_information(self) -> User: def get_user_information(self) -> User:
"""Init tables in database""" """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 = telegram.Dispatcher(bot=self.bot)
self.dispatcher.register_message_handler(self.on_message) self.dispatcher.register_message_handler(self.on_message)
async def run(self): async def run(self) -> None:
await self.dispatcher.start_polling() await self.dispatcher.start_polling()
async def on_message(self, msg): async def on_message(self, msg):