Discord Webhooks
CocoKOTH can send KOTH events to Discord using webhooks.
Configuration
Add webhook configuration to any KOTH file:
plugins/CocoKoth/koths/example.yml
webhook:
url: "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
start:
enabled: true
content: "Get ready!"
color: "#FF0000"
title:
text: "%displayName% - STARTED"
fields:
1:
inline: true
name: "Time"
value: "%timeLeft_formatted%"
stop:
enabled: true
color: "#CC0000"
title:
text: "%displayName% - STOPPED"
fields:
1:
inline: true
name: "Time"
value: "%timeTaken_formatted%"
capture-start:
enabled: true
color: "#AAFFAA"
title:
text: "%displayName% - CAPTURE STARTED"
fields:
1:
inline: true
name: "Capturer"
value: "%capturer%"
2:
inline: true
name: "Time"
value: "%timeLeft_formatted%"
capture-end:
enabled: true
color: "#FFAAAA"
title:
text: "%displayName% - CAPTURE STOPPED"
fields:
1:
inline: true
name: "Capturer"
value: "%capturer%"
2:
inline: true
name: "Time"
value: "%timeLeft_formatted%"
captured:
enabled: true
content: ":tada:"
color: "#00FF00"
title:
text: "%displayName% - CAPTURED"
fields:
1:
inline: true
name: "Capturer"
value: "%capturer%"
2:
inline: true
name: "Time"
value: "%timeTaken_formatted%"
Available Events
| Event | Description |
|---|---|
| start | KOTH event started |
| stop | KOTH event stopped |
| capture-start | Player started capturing |
| capture-end | Player stopped capturing |
| captured | KOTH was captured |
Placeholders
| Placeholder | Description |
|---|---|
| %displayName% | KOTH display name |
| %capturer% | Current capturer name |
| %timeLeft_formatted% | Time remaining formatted |
| %timeTaken_formatted% | Time taken formatted |
| %starter% | Player who started the KOTH |
Setup Guide
- Go to your Discord server settings
- Navigate to Integrations → Webhooks
- Click New Webhook
- Copy the webhook URL
- Paste the URL in your KOTH configuration
- Enable the events you want to send
- Reload the plugin:
/koth reload
Embed Customization
Each webhook event supports:
- content: Plain text message above the embed
- color: Hex color for the embed sidebar
- title.text: Embed title
- fields: Multiple inline or block fields with name and value