summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fortnite_client/fortnite_events.py1
-rw-r--r--telegram_bot/__init__.py5
2 files changed, 4 insertions, 2 deletions
diff --git a/fortnite_client/fortnite_events.py b/fortnite_client/fortnite_events.py
index d4fb2d0..01ca888 100644
--- a/fortnite_client/fortnite_events.py
+++ b/fortnite_client/fortnite_events.py
@@ -44,7 +44,6 @@ class NewFriendObserverImpl(NewFriendObserver):
self.__stats_repository = stats_repository
async def on_event(self, friend: User) -> None:
- print('Record new friend stats')
await self.__stats_repository.put_stats(friend)
await self.__telegram_bot.send_message_to_all(format_new_friend(friend.display_name))
diff --git a/telegram_bot/__init__.py b/telegram_bot/__init__.py
index ab9f61d..95b7af8 100644
--- a/telegram_bot/__init__.py
+++ b/telegram_bot/__init__.py
@@ -26,7 +26,10 @@ class TelegramBot:
exception_handler=ExceptionHandler())
async def run(self):
- await self.__bot.polling()
+ await self.__bot.polling(
+ non_stop=True,
+ timeout=100
+ )
def register_command_handler(self, command: str, command_handler: CommandHandler):
self.__bot.register_message_handler(