From c475667c4078d06d6097075a01d285ac0308e0fe Mon Sep 17 00:00:00 2001 From: profitroll Date: Tue, 13 Dec 2022 14:38:38 +0100 Subject: [PATCH] Docstring added --- classes/holo_user.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/classes/holo_user.py b/classes/holo_user.py index dbbd1ab..6b8a55b 100644 --- a/classes/holo_user.py +++ b/classes/holo_user.py @@ -84,7 +84,22 @@ class HoloUser(): voice: Union[str, Voice, None] = None, adm_origin: bool = False, adm_context: bool = False - ): + ): + """Send a message to user + + ### Args: + * context (`Message`): Context (mostly the message where this method is called) + * origin (`Union[Message, None]`, optional): Origin message where to refer. None if called in a command. Defaults to None. + * text (`Union[str, None]`, optional): Text if this is a simple text message. Defaults to None. + * caption (`Union[str, None]`, optional): Text if this is a media message. Defaults to None. + * photo (`Union[str, Photo, None]`, optional): Photo as a photo object or file_id as a string. Defaults to None. + * video (`Union[str, Video, None]`, optional): Video as a video object or file_id as a string. Defaults to None. + * file (`Union[str, Document, None]`, optional): File as a document object or file_id as a string. Defaults to None. + * animation (`Union[str, Animation, None]`, optional): Animation as an animation object or file_id as a string. Defaults to None. + * voice (`Union[str, Voice, None]`, optional): Voice as a voice object or file_id as a string. Defaults to None. + * adm_origin (`bool`, optional): Whether origin sender is an admin. Defaults to False. + * adm_context (`bool`, optional): Whether context sender is an admin. Defaults to False. + """ if text is not None: logWrite(f"{context.from_user.id} sent message '{text}' to {self.id}")