Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to send script output to discord script (piping) #62

Open
JosKlever opened this issue Dec 29, 2024 · 1 comment
Open

Comments

@JosKlever
Copy link

I'm trying to replace my Slack notifications for server monitoring to Discord and it would be great if I can output my scripts to the discord script, so it takes the output as --text parameter value if it is omitted.

I've named the script discord and added it to the PATH.

Example (using yours):
discord --title "My notification" --text "$(cat filename | jq -Rs . | cut -c 2- | rev | cut -c 2- | rev)"
becomes
cat filename | jq -Rs . | cut -c 2- | rev | cut -c 2- | rev | discord --title "My notification"

My issue is that I have various cron jobs that have some more complicated one-liners containing quotes, double quotes and backticks and it breaks the "$(...)" usage.

@Kogitae
Copy link

Kogitae commented Dec 30, 2024

i agree too, using pipe will be more unix friendly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants