https://github.com/sor4chi/discorder
send discord webhook from cli
https://github.com/sor4chi/discorder
Last synced: 4 months ago
JSON representation
send discord webhook from cli
- Host: GitHub
- URL: https://github.com/sor4chi/discorder
- Owner: sor4chi
- Created: 2023-09-03T00:52:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-23T11:18:21.000Z (about 2 years ago)
- Last Synced: 2025-03-31T00:41:25.160Z (9 months ago)
- Language: Rust
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Discorder
A cli tool for sending text or file to Discord Webhook
```txt
Usage: discorder [OPTIONS]
Options:
-w, --webhook Discord Webhook URL
-t, --text A text to send
-f, --file A file to send
-c, --config Config file path [default: ./discorder.yaml]
-h, --help Print help
-V, --version Print version
```
## Installation
All [releases](
https://github.com/sor4chi/discorder/releases
) are available on GitHub.
### eg. using `wget` and `unzip`
```sh
$ wget
$ unzip
$ sudo install /usr/local/bin
```
## Usage
```sh
# Send a text
$ discorder -w https://discordapp.com/api/webhooks/xxx/yyy -t "Hello, World!"
# Send a file
$ discorder -w https://discordapp.com/api/webhooks/xxx/yyy -f ./hello.txt
# Send a text and a file
$ discorder -w https://discordapp.com/api/webhooks/xxx/yyy -t "Hello, World!" -f ./hello.txt
# Send from stdin
$ echo "Hello, World!" | discorder -w https://discordapp.com/api/webhooks/xxx/yyy
$ cat ./hello.txt | discorder -w https://discordapp.com/api/webhooks/xxx/yyy
```
## Config file
```yaml
webhook: https://discordapp.com/api/webhooks/xxx/yyy
```
Config load order is:
1. `$DISCORDER_CONFIG_PATH` environment variable
2. `--config` option
3. `./discorder.yml`
4. `./discorder.yaml`
5. `~/.config/discorder/discorder.yml`
6. `~/.config/discorder/discorder.yaml`