Blame
| 7efbfc | Thai Pangsakulyanont | 2026-01-31 18:05:00 | 1 | --- |
| 2 | name: discord |
|||
| 3 | description: Use this skill to send a message over Discord to the operator |
|||
| 4 | --- |
|||
| 5 | ||||
| 4f8fa0 | Thai Pangsakulyanont | 2026-02-08 06:11:41 | 6 | 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. |
| 7 | ||||
| 8 | The script is essentially implemented this way: |
|||
| 9 | ||||
| 10 | ```sh |
|||
| 11 | #!/bin/bash -e |
|||
| 12 | curl -X POST "$@" <webhook_url> |
|||
| 13 | ``` |
|||
| 14 | ||||
| 15 | Here are some examples: |
|||
| 7efbfc | Thai Pangsakulyanont | 2026-01-31 18:05:00 | 16 | |
| 17 | ```sh |
|||
| 18 | # Send a message |
|||
| 4f8fa0 | Thai Pangsakulyanont | 2026-02-08 06:11:41 | 19 | ~/.local/bin/discord-curl -F 'content=hello' |
| 7efbfc | Thai Pangsakulyanont | 2026-01-31 18:05:00 | 20 | |
| 21 | # Send a message with file |
|||
| 4f8fa0 | Thai Pangsakulyanont | 2026-02-08 06:11:41 | 22 | ~/.local/bin/discord-curl -F 'content=hello' -F 'files[0]=@/etc/os-release' |
| 7efbfc | Thai Pangsakulyanont | 2026-01-31 18:05:00 | 23 | ``` |
