diff options
author | Dmitrii Morozov <snoopdesigns@gmail.com> | 2024-05-08 14:31:01 +0200 |
---|---|---|
committer | Dmitrii Morozov <snoopdesigns@gmail.com> | 2024-05-08 14:31:01 +0200 |
commit | 30b42356ab151090a51b5d1451a6ad9dbbacdddf (patch) | |
tree | 88b49b0b696fd06915f6f92d40829ca464fad381 /telegram_bot/__init__.py | |
parent | 435c13fe93d5da72b1d4d3ff927b07c76eff01f6 (diff) |
non-stop telebot polling
Diffstat (limited to 'telegram_bot/__init__.py')
-rw-r--r-- | telegram_bot/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
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( |