Discord Notification Skill
Send a rich embed notification to Discord and optionally wait for a human reply.
Usage
Run the CLI tool via uv:
uv run --project ${CLAUDE_PLUGIN_ROOT} discord-notify \
--message "Your message here" \
[--title "Optional Title"] \
[--color "#5865F2"] \
[--fields '[{"name": "Field", "value": "Value", "inline": true}]'] \
[--file /path/to/file] \
[--wait] \
[--timeout 300]
When to use --wait
- •With
--wait: When you need human input, approval, or a decision before continuing. The bot will block until the user replies in the Discord channel or the timeout expires. - •Without
--wait(fire-and-forget): For status updates, progress reports, or completion notifications where no reply is needed.
IMPORTANT: When using --wait, you MUST set the Bash tool timeout to 600000 (10 minutes, the maximum). The --timeout flag controls how long the bot waits for a Discord reply, but the Bash execution timeout must be at least as long or the command will be killed before a reply arrives. Set --timeout 86400 (1 day) for the bot and always use timeout: 600000 on the Bash tool call.
Parsing the response
The script outputs a single JSON object to stdout:
{
"success": true,
"message_id": 123456789,
"response": "User's reply text or null",
"author": "username#1234 or null",
"timestamp": "ISO 8601 timestamp or null",
"error": "error message or null"
}
- •If
successisfalse, check theerrorfield. - •If
--waitwas used and the timeout expired,successistruebutresponseisnullanderrorcontains a timeout note.
Examples
Fire-and-forget status update
uv run --project ${CLAUDE_PLUGIN_ROOT} discord-notify \
--title "Build Complete" \
--message "All tests passed. Deployment ready." \
--color "#57F287"
Ask for approval (blocking)
uv run --project ${CLAUDE_PLUGIN_ROOT} discord-notify \
--title "Approval Needed" \
--message "Ready to deploy to production. Reply 'yes' to confirm or 'no' to cancel." \
--color "#FEE75C" \
--wait \
--timeout 600
Send with file attachments
uv run --project ${CLAUDE_PLUGIN_ROOT} discord-notify \
--title "Build Artifacts" \
--message "Here are the build logs and test report." \
--file /tmp/build.log \
--file /tmp/test-report.html
Report with fields
uv run --project ${CLAUDE_PLUGIN_ROOT} discord-notify \
--title "Test Results" \
--message "Test suite completed." \
--fields '[{"name": "Passed", "value": "42", "inline": true}, {"name": "Failed", "value": "0", "inline": true}]'
Setup
If the config file is not found, instruct the user to run /discord-setup to configure their bot token and channel ID.