Comment methods API¶
SendCommentMethod ¶
Bases: BaseMaxApiMethod[Message | None]
__call__
async
¶
__call__(
chat_id: int,
post_id: int,
text: str | None = None,
reply_to: int | str | None = None,
attachments: list[BaseFileAttachment] | None = None,
*,
notify: bool = True
) -> Message | None
Send a comment to a channel post.
Source code in src/pyromax/methods/SendComment.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
FetchCommentsMethod ¶
Bases: BaseMaxApiMethod[FetchCommentsResult]
__call__
async
¶
__call__(
chat_id: int,
post_id: int,
from_: int | None = ...,
backward: int = ...,
get_messages: Literal[True] = True,
forward: int = ...,
get_chat: Literal[False] = False,
) -> list[Message]
__call__(
chat_id: int,
post_id: int,
from_: int | None = ...,
backward: int = ...,
get_messages: Literal[True] = True,
forward: int = ...,
get_chat: Literal[True] = True,
) -> tuple[list[Message], Chat | None]
__call__(
chat_id: int,
post_id: int,
from_: int | None = ...,
backward: int = ...,
get_messages: Literal[False] = False,
forward: int = ...,
get_chat: Literal[False] = False,
) -> list[int | str]
__call__(
chat_id: int,
post_id: int,
from_: int | None = ...,
backward: int = ...,
get_messages: Literal[False] = False,
forward: int = ...,
get_chat: Literal[True] = True,
) -> tuple[list[int | str], Chat | None]
__call__(
chat_id: int,
post_id: int,
from_: int | None = ...,
backward: int = ...,
get_messages: bool = ...,
forward: int = ...,
get_chat: bool = ...,
) -> FetchCommentsResult
__call__(
chat_id: int,
post_id: int,
from_: int | None = None,
backward: int = 30,
get_messages: bool = True,
forward: int = 0,
get_chat: bool = False,
) -> FetchCommentsResult
Fetch comments for a channel post.
Source code in src/pyromax/methods/FetchComments.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
GetCommentMethod ¶
Bases: BaseMaxApiMethod[Message | None]
__call__
async
¶
__call__(
chat_id: int, post_id: int, message_id: int | str
) -> Message | None
Get one comment from a channel post.
Source code in src/pyromax/methods/GetComment.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
GetCommentsMethod ¶
Bases: BaseMaxApiMethod[list[Message]]
__call__
async
¶
__call__(
chat_id: int, post_id: int, message_ids: list[int | str]
) -> list[Message]
Get specific comments from a channel post.
Source code in src/pyromax/methods/GetComments.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
EditCommentMethod ¶
Bases: BaseMaxApiMethod[Message]
__call__
async
¶
__call__(
chat_id: int,
post_id: int,
message_id: int | str,
text: str | None = None,
attachments: list[BaseFileAttachment] | None = None,
) -> Message
Edit a comment on a channel post.
Source code in src/pyromax/methods/EditComment.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
DeleteCommentMethod ¶
Bases: BaseMaxApiMethod[bool]
__call__
async
¶
__call__(
chat_id: int,
post_id: int,
message_ids: list[int] | list[str],
for_me: bool = False,
) -> bool
Delete comments from a channel post.
Source code in src/pyromax/methods/DeleteComment.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
AddCommentReactionMethod ¶
Bases: BaseMaxApiMethod[EmojiReaction | None]
__call__
async
¶
__call__(
chat_id: int,
post_id: int,
message_id: int | str,
reaction: str,
) -> EmojiReaction | None
Add or replace the current account's reaction to a comment.
Source code in src/pyromax/methods/AddCommentReaction.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | |
RemoveCommentReactionMethod ¶
Bases: BaseMaxApiMethod[EmojiReaction | None]
__call__
async
¶
__call__(
chat_id: int, post_id: int, message_id: int | str
) -> EmojiReaction | None
Remove the current account's reaction from a comment.
Source code in src/pyromax/methods/RemoveCommentReaction.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | |
SubscribeCommentsMethod ¶
Bases: BaseMaxApiMethod[None]
__call__
async
¶
__call__(
chat_id: int, post_id: int, subscribe: bool = True
) -> None
Subscribe to or unsubscribe from a post's comment events.
Source code in src/pyromax/methods/SubscribeComments.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
GetCommentsInfoMethod ¶
Bases: BaseMaxApiMethod[list[CommentsInfoUpdate]]
__call__
async
¶
__call__(
chat_id: int, post_ids: list[int]
) -> list[CommentsInfoUpdate]
Get comment counters for channel posts.
Source code in src/pyromax/methods/GetCommentsInfo.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
DeleteUserCommentsMethod ¶
Bases: BaseMaxApiMethod[bool]
__call__
async
¶
__call__(
chat_id: int,
post_id: int,
user_id: int,
message_id: int | str,
) -> bool
Delete a user's comments through the dedicated server operation.
Source code in src/pyromax/methods/DeleteUserComments.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
SetChannelCommentsMethod ¶
Bases: BaseMaxApiMethod[None]
__call__
async
¶
__call__(chat_id: int, enabled: bool) -> None
Enable or disable comments in a channel.
Source code in src/pyromax/methods/SetChannelComments.py
7 8 9 10 11 12 13 14 15 16 17 18 19 | |
BlockCommentAuthorMethod ¶
Bases: BaseMaxApiMethod[bool]
__call__
async
¶
__call__(
chat_id: int,
post_id: int,
user_ids: list[int],
message_id: int | str,
clean_msg_period: int = 0,
) -> bool
Block comment authors and optionally remove their comments.
Source code in src/pyromax/methods/BlockCommentAuthor.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |