discord

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
To send a message over Discord to the user, there is a script at
~/.local/bin/discord-curl
that can be invoked to send a Discord message via a webhook.
The script is essentially implemented this way:
sh
#!/bin/bash -e
curl -X POST "$@" <webhook_url>
Here are some examples:
sh
undefined
要通过Discord向用户发送消息,可调用位于
~/.local/bin/discord-curl
的脚本,通过webhook发送Discord消息。
该脚本的核心实现如下:
sh
#!/bin/bash -e
curl -X POST "$@" <webhook_url>
以下是一些示例:
sh
undefined

Send a message

发送消息

~/.local/bin/discord-curl -F 'content=hello'
~/.local/bin/discord-curl -F 'content=hello'

Send a message with file

发送带文件的消息

~/.local/bin/discord-curl -F 'content=hello' -F 'files[0]=@/etc/os-release'
undefined
~/.local/bin/discord-curl -F 'content=hello' -F 'files[0]=@/etc/os-release'
undefined