EFBChat

class ehforwarderbot.EFBChat(channel: Optional[ehforwarderbot.channel.EFBChannel] = None)[source]

EFB Chat object. This is used to represent a chat or a group member.

channel_id

Unique ID of the channel.

Type:str
channel_emoji

Emoji of the channel.

Type:str
channel_name

Name of the channel.

Type:str
chat_name

Name of the chat.

Type:str
chat_alias

Alternative name of the chat, usually set by user.

Type:str
chat_type

Type of the chat.

Type:ChatType
chat_uid

Unique ID of the chat. This should be unique within the channel.

Type:str
is_chat

Indicate if this object represents a chat. Defaulted to True. This should be set to False when used on a group member.

Type:bool
group

The parent chat of the member. Only available to chat member objects. Defaulted to None.

Type:EFBChat or None
members

Provide a list of members in the group. Defaulted to an empty list. You may want to extend this object and implement a @property method set for loading members on demand.

Type:list of EFBChat
vendor_specific

Any vendor specific attributes.

Type:Dict[str, Any]
is_self

Indicate if this chat represents the user.

Type:bool
is_system

Indicate if this chat represents a system chat/member.

Type:bool
__init__(channel: Optional[ehforwarderbot.channel.EFBChannel] = None)[source]
Parameters:channel (Optional[EFBChannel]) – Provide the channel object to fill channel_name, channel_emoji, and channel_id automatically.
is_self

If this chat represents the user

is_system

If this chat is a system chat

self() → ehforwarderbot.chat.EFBChat[source]

Set the chat as yourself. In this context, “yourself” means the user behind the master channel. Every channel should relate this to the corresponding target.

Returns:This object.
Return type:EFBChat
system() → ehforwarderbot.chat.EFBChat[source]

Set the chat as a system chat. Only set for channel-level and group-level system chats.

Returns:This object.
Return type:EFBChat
verify()[source]

Verify the completeness of the data.

Raises:ValueError – When this chat is invalid.