mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 09:22:03 +00:00
Change timeout calculator in ChatActions helper.
This commit is contained in:
parent
f11775fcef
commit
61e7ff9a47
1 changed files with 3 additions and 1 deletions
|
|
@ -217,7 +217,7 @@ class ChatActions(helper.Helper):
|
|||
await asyncio.sleep(sleep)
|
||||
|
||||
@classmethod
|
||||
def calc_timeout(cls, text, timeout=.05):
|
||||
def calc_timeout(cls, text, timeout=.8):
|
||||
"""
|
||||
Calculate timeout for text
|
||||
|
||||
|
|
@ -235,6 +235,8 @@ class ChatActions(helper.Helper):
|
|||
:param sleep: sleep timeout
|
||||
:return:
|
||||
"""
|
||||
if isinstance(sleep, str):
|
||||
sleep = cls.calc_timeout(sleep)
|
||||
await cls._do(cls.TYPING, sleep)
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue