https://github.com/sor4chi/discorder
send discord webhook from cli
https://github.com/sor4chi/discorder
Last synced: about 1 month 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 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-23T11:18:21.000Z (over 1 year ago)
- Last Synced: 2025-02-06T05:44:19.470Z (3 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`