Durum¶
- class ehforwarderbot.status.ChatUpdates(channel, new_chats=(), removed_chats=(), modified_chats=())[kaynak]¶
Inform the master channel on updates of slave chats.
- channel¶
Slave channel that issues the update
- Type
- __init__(channel, new_chats=(), removed_chats=(), modified_chats=())[kaynak]¶
- Parametreler
channel (
SlaveChannel) – Slave channel that issues the updatenew_chats (Optional[Collection[str]]) – Unique ID of new chats
removed_chats (Optional[Collection[str]]) – Unique ID of removed chats
modified_chats (Optional[Collection[str]]) – Unique ID of modified chats
- class ehforwarderbot.status.MemberUpdates(channel, chat_id, new_members=(), removed_members=(), modified_members=())[kaynak]¶
Inform the master channel on updates of members in a slave chat.
- channel¶
Slave channel that issues the update
- Type
- __init__(channel, chat_id, new_members=(), removed_members=(), modified_members=())[kaynak]¶
- Parametreler
channel (
SlaveChannel) – Slave channel that issues the updatechat_id (str) – Unique ID of the chat.
new_members (Optional[Collection[str]]) – Unique ID of new members
removed_members (Optional[Collection[str]]) – Unique ID of removed members
modified_members (Optional[Collection[str]]) – Unique ID of modified members
- class ehforwarderbot.status.MessageReactionsUpdate(chat, msg_id, reactions)[kaynak]¶
Update reacts of a message, issued from slave channel to master channel.
- Parametreler
chat (
Chat) – The chat where message is sentmsg_id (str) – ID of the message for the reacts
reactions (
Mapping[NewType()(ReactionName,str),Collection[ChatMember]]) – Indicate reactions to the message. Dictionary key represents the reaction name, usually an emoji. Value is a collection of users who reacted to the message with that certain emoji. AllChatobjects in this dict MUST be members in the chat of the message.destination_channel (
MasterChannel) – Channel the status is issued to, which is always the master channel.
- __init__(chat, msg_id, reactions)[kaynak]¶
- Parametreler
chat (
Chat) – The chat where message is sentmsg_id (str) – ID of the message for the reacts
reactions (
Mapping[NewType()(ReactionName,str),Collection[ChatMember]]) – Indicate reactions to the message. Dictionary key represents the reaction name, usually an emoji. Value is a collection of users who reacted to the message with that certain emoji. AllChatobjects in this dict MUST be members in the chat of the message.
- class ehforwarderbot.status.MessageRemoval(source_channel, destination_channel, message)[kaynak]¶
Inform a channel to remove a certain message.
This is usually known as “delete from everyone”, “delete from recipient”, “recall a message”, “unsend”, or “revoke a message” as well, depends on the IM platform.
Some channels MAY not support removal of messages, and raises a
exceptions.EFBOperationNotSupportedexception.Feedback by sending another
MessageRemovalback is not required when this object is sent from a master channel. Master channels SHOULD treat a successful delivery of this status as a successful removal.- message¶
Message to remove. This MAY not be a complete
message.Messageobject.- Type
- Harekete geçirir
.exceptions.EFBOperationNotSupported – When message removal is not supported in the channel.
- __init__(source_channel, destination_channel, message)[kaynak]¶
Create a message removal status
Try to provided as much as you can, if not, provide a minimum information in the channel:
Slave channel ID and chat ID (
message.chat.module_idandmessage.chat.uid)Message unique ID from the slave channel (
message.uid)
- class ehforwarderbot.status.ReactToMessage(chat, msg_id, reaction)[kaynak]¶
Created when user react to a message, issued from master channel.
When this status is sent, a
status.MessageReactionsUpdateis RECOMMENDED to be issued back to master channel.- Parametreler
chat (
Chat) – The chat where message is sentmsg_id (str) – ID of the message to react to
reaction (Optional[str]) – The reaction name to be sent, usually an emoji. Set to
Noneto remove reaction.destination_channel (
SlaveChannel) – Channel the status is issued to, extracted from the chat object.
- Harekete geçirir
.exceptions.EFBMessageReactionNotPossible – Raised when the reaction is not valid (e.g. the specific reaction is not in the list of possible reactions).
.exceptions.EFBOperationNotSupported – Raised when reaction in any form is not supported to the message at all.