Status

class ehforwarderbot.EFBStatus[source]

Abstract class of a status

destination_channel

The channel that this status is sent to, usually the master channel.

Type:EFBChannel
class ehforwarderbot.status.EFBChatUpdates(channel: EFBChannel, new_chats: Optional[Tuple[str]]=tuple(), removed_chats: Optional[Tuple[str]]=tuple(), modified_chats: Optional[Tuple[str]]=tuple())[source]

Inform the master channel on updates of slave chats.

channel

Slave channel that issues the update

Type:EFBChannel
new_chats

Unique ID of new chats

Type:Optional[Tuple[str]]
removed_chats

Unique ID of removed chats

Type:Optional[Tuple[str]]
modified_chats

Unique ID of modified chats

Type:Optional[Tuple[str]]
__init__(channel: EFBChannel, new_chats: Optional[Tuple[str]]=tuple(), removed_chats: Optional[Tuple[str]]=tuple(), modified_chats: Optional[Tuple[str]]=tuple())[source]
Parameters:
  • channel (EFBChannel) – Slave channel that issues the update
  • new_chats (Optional[Tuple[str]]) – Unique ID of new chats
  • removed_chats (Optional[Tuple[str]]) – Unique ID of removed chats
  • modified_chats (Optional[Tuple[str]]) – Unique ID of modified chats
class ehforwarderbot.status.EFBMemberUpdates(channel: EFBChannel, chat_id: str, new_members: Optional[Tuple[str]]=tuple(), removed_members: Optional[Tuple[str]]=tuple(), modified_members: Optional[Tuple[str]]=tuple())[source]

Inform the master channel on updates of members in a slave chat.

channel

Slave channel that issues the update

Type:EFBChannel
chat_id

Unique ID of the chat.

Type:str
new_members

Unique ID of new members

Type:Optional[Tuple[str]]
removed_members

Unique ID of removed members

Type:Optional[Tuple[str]]
modified_members

Unique ID of modified members

Type:Optional[Tuple[str]]
__init__(channel: EFBChannel, chat_id: str, new_members: Optional[Tuple[str]]=tuple(), removed_members: Optional[Tuple[str]]=tuple(), modified_members: Optional[Tuple[str]]=tuple())[source]
Parameters:
  • channel (EFBChannel) – Slave channel that issues the update
  • chat_id (str) – Unique ID of the chat.
  • new_members (Optional[Tuple[str]]) – Unique ID of new members
  • removed_members (Optional[Tuple[str]]) – Unique ID of removed members
  • modified_members (Optional[Tuple[str]]) – Unique ID of modified members
class ehforwarderbot.status.EFBMessageRemoval(source_channel: EFBChannel, destination_channel: EFBChannel, message: EFBMsg)[source]

Inform a channel to remove a certain message.

This is usually known as “delete from everyone”, “delete from recipient”, “recall a message”, or “revoke a message” as well, depends on the IM.

Some channels may not support removal of messages, and raises a exceptions.EFBOperationNotSupported exception.

source_channel

Channel issued the status

Type:EFBChannel
destination_channel

Channel the status is issued to

Type:EFBChannel
message

Message to remove. This may not be a complete EFBMsg object.

Type:EFBMsg
__init__(source_channel: EFBChannel, destination_channel: EFBChannel, message: EFBMsg)[source]

Create a message removal status

Try to provided as much as you can, if not, provide a minimum information in the channel:

Parameters:
  • source_channel (EFBChannel) – Channel issued the status
  • destination_channel (EFBChannel) – Channel the status is issued to
  • message (EFBMsg) – Message to remove.