mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 16:15:51 +00:00
Added message_thread_id parameter to ChatActionSender class methods (#1437)
* Added message_thread_id parameter to ChatActionSender class methods * Added changelog * rename chagelog file
This commit is contained in:
parent
0c9eeda8a7
commit
506dacc0ff
2 changed files with 24 additions and 0 deletions
1
CHANGES/1437.feature.rst
Normal file
1
CHANGES/1437.feature.rst
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Added **message_thread_id** parameter to **ChatActionSender** class methods.
|
||||||
|
|
@ -41,6 +41,7 @@ class ChatActionSender:
|
||||||
"""
|
"""
|
||||||
:param bot: instance of the bot
|
:param bot: instance of the bot
|
||||||
:param chat_id: target chat id
|
:param chat_id: target chat id
|
||||||
|
:param message_thread_id: unique identifier for the target message thread; supergroups only
|
||||||
:param action: chat action type
|
:param action: chat action type
|
||||||
:param interval: interval between iterations
|
:param interval: interval between iterations
|
||||||
:param initial_sleep: sleep before first sending of the action
|
:param initial_sleep: sleep before first sending of the action
|
||||||
|
|
@ -136,6 +137,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -143,6 +145,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="typing",
|
action="typing",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
@ -153,6 +156,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -160,6 +164,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="upload_photo",
|
action="upload_photo",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
@ -170,6 +175,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -177,6 +183,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="record_video",
|
action="record_video",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
@ -187,6 +194,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -194,6 +202,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="upload_video",
|
action="upload_video",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
@ -204,6 +213,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -211,6 +221,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="record_voice",
|
action="record_voice",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
@ -221,6 +232,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -228,6 +240,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="upload_voice",
|
action="upload_voice",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
@ -238,6 +251,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -245,6 +259,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="upload_document",
|
action="upload_document",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
@ -255,6 +270,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -262,6 +278,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="choose_sticker",
|
action="choose_sticker",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
@ -272,6 +289,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -279,6 +297,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="find_location",
|
action="find_location",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
@ -289,6 +308,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -296,6 +316,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="record_video_note",
|
action="record_video_note",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
@ -306,6 +327,7 @@ class ChatActionSender:
|
||||||
cls,
|
cls,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
message_thread_id: Optional[int] = None,
|
||||||
interval: float = DEFAULT_INTERVAL,
|
interval: float = DEFAULT_INTERVAL,
|
||||||
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
initial_sleep: float = DEFAULT_INITIAL_SLEEP,
|
||||||
) -> "ChatActionSender":
|
) -> "ChatActionSender":
|
||||||
|
|
@ -313,6 +335,7 @@ class ChatActionSender:
|
||||||
return cls(
|
return cls(
|
||||||
bot=bot,
|
bot=bot,
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
action="upload_video_note",
|
action="upload_video_note",
|
||||||
interval=interval,
|
interval=interval,
|
||||||
initial_sleep=initial_sleep,
|
initial_sleep=initial_sleep,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue