https://github.com/andrewl/discord_notify
Enables pushing notifications into discord from the commandline using only bash & curl
https://github.com/andrewl/discord_notify
discord shell
Last synced: 2 months ago
JSON representation
Enables pushing notifications into discord from the commandline using only bash & curl
- Host: GitHub
- URL: https://github.com/andrewl/discord_notify
- Owner: andrewl
- Created: 2017-08-17T13:36:24.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-17T13:44:38.000Z (almost 9 years ago)
- Last Synced: 2025-05-17T04:07:19.483Z (about 1 year ago)
- Topics: discord, shell
- Language: Shell
- Size: 1000 Bytes
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Discord Notify
============
Why?
----
This simple script enables you to post a message into discord from the command line without the need to install a Ruby, Node, PHP application with their boatload of dependencies.
Install
-------
1. Create an Incoming Webhook on your Discord channel.
2. (Optional) Copy discord_notify.sh to your path.
Usage
-----
Set the environment variable DISCORD_WEBHOOK_URL to the url of your Incoming Webhook. Optionally set the environment variable DISCORD_USERNAME to the username to post as.
The message to send is passed as the parameter to the script.
Example
-------
Sending "Hello, Discord"
DISCORD_WEBHOOK_URL="https://discordapp.com/api/webhooks/123456/abcdef" discord_notify.sh "Hello, Discord"
Sending the amount of free space on the boot partition
FREE_SPACE=`df -h --output=used /boot | tail -n 1` DISCORD_WEBHOOK_URL="https://discordapp.com/api/webhooks/123456/abcdef" discord_notify.sh "Boot partition has $FREESPACE free space"