MCPcopy Create free account
hub / github.com/ehForwarderBot/ehForwarderBot / __init__

Method __init__

ehforwarderbot/chat.py:303–328  ·  view source on GitHub ↗

Args: chat (:class:`~.chat.Chat`): Chat associated with this member. Keyword Args: name (str): Name of the member. alias (Optional[str]): Alternative name of the member, usually set by user. uid (:obj:`.ChatID` (str)):

(self, chat: 'Chat', *,
                 name: str = "", alias: Optional[str] = None, id: ChatID = ChatID(""),
                 uid: ChatID = ChatID(""),
                 vendor_specific: Dict[str, Any] = None, description: str = "",
                 middleware: Optional[Middleware] = None)

Source from the content-addressed store, hash-verified

301 SELF_ID = ChatID("__self__")
302
303 def __init__(self, chat: 'Chat', *,
304 name: str = "", alias: Optional[str] = None, id: ChatID = ChatID(""),
305 uid: ChatID = ChatID(""),
306 vendor_specific: Dict[str, Any] = None, description: str = "",
307 middleware: Optional[Middleware] = None):
308 """
309 Args:
310 chat (:class:`~.chat.Chat`): Chat associated with this member.
311
312 Keyword Args:
313 name (str): Name of the member.
314 alias (Optional[str]): Alternative name of the member, usually set by user.
315 uid (:obj:`.ChatID` (str)):
316 Unique ID of the member. This MUST be unique within the channel.
317 This ID can be the same with a private chat of the same person.
318 description (str):
319 A text description of the member, usually known as “bio”,
320 “description”, “summary” or “introduction” of the member.
321 middleware (:class:`.Middleware`): Initialize this chat as a part
322 of a middleware.
323 """
324 name = name or translator.gettext("You")
325 uid = uid or id or self.SELF_ID
326 super().__init__(chat, name=name, alias=alias, id=id, uid=uid,
327 vendor_specific=vendor_specific, description=description,
328 middleware=middleware)
329
330
331class SystemChatMember(ChatMember):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected