x feishu bot
Send messages using Feishu Webhook
Sub Commands
| Name | Description |
|---|---|
| x feishu bot send | Send messages using Feishu Webhook |
x feishu bot send
Send messages using Feishu Webhook
- Examples:
Send text messages to Feishu via Webhook
x feishu bot send --text "x-cmd 新版本发布成功"A message with the title "Demo of Feishu" will be sent, linking to "https://x-cmd.com/mod/feishu"
x feishu bot send --richtext \
--title "Demo of Feishu" \
--text "Welcome to x-cmd's website for details:" \
--url "website" "https://x-cmd.com/mod/feishu"- Sub Commands:
| Name | Description |
|---|---|
| x feishu bot send --raw | send raw json |
| x feishu bot send --text | Send text type messages |
| x feishu bot send --richtext | Send a rich text message composed of text, images, and hyperlinks |
| x feishu bot send --image | Send image type messages |
| x feishu bot send --share_chat | Share group business cards |
x feishu bot send --raw
send raw json
- Examples:
Send text type messages to Feishu group
x feishu send --raw - <<A
{
"msgtype": "text",
"text": {
"content": "<content>"
}
}
AReading JSON data from a file and sending a message
cat markdown.json | x feishu send --raw -- Usage:
x feishu bot send --raw [FLAGS] <#1>- Arguments:
| Argument | Description |
|---|---|
#1 | The original JSON message content that was sent. You can read JSON data from standard input using "-" |
- Flags:
| Name, Shorthand | Description |
|---|---|
--json, -j | Output in Json format |
--webhook | The webhook used by the specified group of bots to send messages |
x feishu bot send --text
Send text type messages
- Examples:
Send text type messages to Feishu group
x feishu send --text "x-cmd 新版本发布成功"- Usage:
x feishu bot send --text [FLAGS] <#1>- Arguments:
| Argument | Description |
|---|---|
#1 | The content of the message |
- Flags:
| Name, Shorthand | Description |
|---|---|
--json, -j | Output in Json format |
--webhook | The webhook used by the specified group of bots to send messages |
x feishu bot send --richtext
Send a rich text message composed of text, images, and hyperlinks
- Examples:
A message with the title "Demo of Feishu" will be sent, linking to "https://x-cmd.com/mod/feishu"
x feishu send --richtext \
--title "Demo of Feishu" \
--text "Welcome to x-cmd's website for details:" \
--url "website" "https://x-cmd.com/mod/feishu"- Usage:
x feishu bot send --richtext [OPTIONS] [FLAGS]- Options:
| Name, Shorthand | Default | Description |
|---|---|---|
--url <text> <url> | button titles and action links | |
--at <userid> <username> | button titles and action links |
- Flags:
| Name, Shorthand | Description |
|---|---|
--text | The content of the message |
--title | The title of the message |
--image_key <image_key> | The key obtained from the image upload interface |
--json, -j | Output in Json format |
--webhook | The webhook used by the specified group of bots to send messages |
x feishu bot send --image
Send image type messages
- Examples:
Send local image to your Feishu
x feishu send --image --image_key "img_v2_41d7c836-04c1-4632-8ec6-4603707c098g"- Usage:
x feishu bot send --image [FLAGS]- Flags:
| Name, Shorthand | Description |
|---|---|
--image_key <image_key> | The key obtained from the image upload interface |
--webhook | The webhook used by the specified group of bots to send messages |
--json, -j | Output in Json format |
x feishu bot send --share_chat
Share group business cards
TIP
Instructions for Obtaining the chat ID: https://open.feishu.cn/document/server-docs/group/chat/chat-id-description
- Examples:
Send a group business card to your Feishu
x feishu send --share_chat --chat_id "oc_188b4521bd02781bef7928bf159d7f11"- Usage:
x feishu bot send --share_chat [FLAGS]- Flags:
| Name, Shorthand | Description |
|---|---|
--chat_id <chat_id> | Chat id |
--webhook | The webhook used by the specified group of bots to send messages |
--json, -j | Output in Json format |
TIP
In interactive terminal ( zsh, bash ... ), Can use Tab to get completion information
Run CMD SUBCOMMAND --help for more information on a command
This article author
Please indicate the source and link of this article when reprinting.
Help us make these docs great!
All X-CMD docs are generated from command help and multiple data sources. See something that's wrong or unclear? Feel free to let us know through any of these ways~