docs: improve documentation formatting and API usage

- Convert the list of optional parameters to a table format for better readability
- Fix the table formatting in the "See the result" section

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy
2024-11-20 22:08:01 +08:00
parent 221e6b6849
commit 94584eda62
+18 -16
View File
@@ -49,21 +49,23 @@ Remove `args` to send the default message.
## Input variables ## Input variables
* socks5 - optional. support socks5 proxy URL | Variable | Description |
* photo - optional. photo message | ------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
* document - optional. document message | socks5 | optional. support socks5 proxy URL |
* sticker - optional. sticker message | photo | optional. photo message |
* audio - optional. audio message | document | optional. document message |
* voice - optional. voice message | sticker | optional. sticker message |
* location - optional. location message | audio | optional. audio message |
* venue - optional. venue message | voice | optional. voice message |
* video - optional. video message | location | optional. location message |
* debug - optional. enable debug mode | venue | optional. venue message |
* format - optional. `markdown` or `html`. See [MarkdownV2 style](https://core.telegram.org/bots/api#markdownv2-style) | video | optional. video message |
* message - optional. custom message | debug | optional. enable debug mode |
* message_file - optional. overwrite the default message template with the contents of the specified file. | format | optional. `markdown` or `html`. See [MarkdownV2 style](https://core.telegram.org/bots/api#markdownv2-style) |
* disable_web_page_preview - optional. disables link previews for links in this message. default is `false`. | message | optional. custom message |
* disable_notification - optional. disables notifications for this message, supports sending a message without notification. default is `false`. | message_file | optional. overwrite the default message template with the contents of the specified file. |
| disable_web_page_preview | optional. disables link previews for links in this message. default is `false`. |
| disable_notification | optional. disables notifications for this message, supports sending a message without notification. default is `false`. |
## Example ## Example
@@ -154,7 +156,7 @@ See the result: (get chat id like `65382999`)
## Template variable ## Template variable
| Github Variable | Telegram Template Variable | | Github Variable | Telegram Template Variable |
|-------------------|----------------------------| | ----------------- | -------------------------- |
| GITHUB_REPOSITORY | repo | | GITHUB_REPOSITORY | repo |
| GITHUB_ACTOR | repo.namespace | | GITHUB_ACTOR | repo.namespace |
| GITHUB_SHA | commit.sha | | GITHUB_SHA | commit.sha |