Merge Beta with Stable releases #1
@ -85,6 +85,21 @@ class HoloUser():
|
|||||||
adm_origin: bool = False,
|
adm_origin: bool = False,
|
||||||
adm_context: 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:
|
if text is not None:
|
||||||
logWrite(f"{context.from_user.id} sent message '{text}' to {self.id}")
|
logWrite(f"{context.from_user.id} sent message '{text}' to {self.id}")
|
||||||
|
Reference in New Issue
Block a user