This repository was archived by the owner on May 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Message Usage
runoneall edited this page Dec 10, 2024
·
6 revisions
简体中文 | English
Language translations may not be 100% accurate
Language translations may not be 100% accurate
from RyhBotPythonSDK import MessageMessage.Token = "Your message token can be found in the Yunhu backend"Send = Message.Send()Send.Text(
recvId = "Target ID",
recvType = "Target Type",
text = "Text"
)Send.Markdown(
recvId = "Target ID",
recvType = "Target Type",
markdown = "Markdown Statements"
)Send.Image(
recvId = "Target ID",
recvType = "Target Type",
imagePath = "Image Path"
)Send.File(
recvId = "Target ID",
recvType = "Target Type",
fileName = "file name",
fileUrl = "File URL"
)-
buttons: A list of buttons, Visit document for more information. -
parentId: The ID of the quoted message.
-
code: Response status code. -
msg: Response information, including exception information. -
data: Response data.
Edit = Message.Edit()Edit.Text(
msgId = "Message ID",
recvId = "Target ID",
recvType = "Target Type",
new_text = "New Text"
)Edit.Markdown(
msgId = "Message ID",
recvId = "Target ID",
recvType = "Target Type",
new_markdown = "New Markdown"
)Edit.Image(
msgId = "Message ID",
recvId = "Target ID",
recvType = "Target Type",
new_image_path = "New Image Path"
)Edit.File(
msgId = "Message ID",
recvId = "Target ID",
recvType = "Target Type",
new_file_name = "New File Name",
new_file_url = "New File URL"
)-
buttons: A list of buttons, Visit document for more information.
-
code: Response status code. -
msg: Response information, including exception information. -
data: Response data.
Delete = Message.DeleteDelete(
msgId="Message ID",
chatId="Target ID",
chatType="Target Type",
)-
code: Response status code. -
msg: Response information, including exception information. -
data: Response data.
Messages = Message.Messages()Messages.Before(
chat_id = "Target ID",
chat_type = "Target Type",
before = Number_of_messages # Int
)Messages.After(
chat_id = "Target ID",
chat_type = "Target Type",
message_id = "Message ID", # Based on a certain message, get the subsequent message
after = Number_of_messages # Int
)-
code: Response status code. -
msg: Response information, including exception information. -
data: Response data.
Board = Message.Board()Board.Text(
recvId = "Target ID",
recvType = "Target Type",
text = "Dashboard text"
)Board.Markdown(
recvId = "Target ID",
recvType = "Target Type",
markdown = "Dashboard Markdown text"
)Board.Html(
recvId = "Target ID",
recvType = "Target Type",
html = "Dashboard HTML text"
)-
expireTime: The expiration time of the message, in seconds.
Board.Dismiss(
recvId = "Target ID",
recvType = "Target Type"
)BoardAll = Message.Board.All()BoardAll.Text(
text = "Dashboard text"
)BoardAll.Markdown(
markdown = "Dashboard Markdown text"
)BoardAll.Html(
html = "Dashboard HTML text"
)-
expireTime: The expiration time of the message, in seconds.
BoardAll.Dismiss()Developer: Runoneall
Translator: Spectrollay
This document is written by English and 简体中文.
English
本文档由English和简体中文编写。
简体中文