Sends Snitch alerts to a Discord channel
- Install the latest
.jar
(uses Forge) - Create a webhook in the config screen of one of your Discord channels (or ask an admin to create a webhook url for you)
- Click the gear next to the channel name
- Select
Webhooks
on the left - Click
Create Webhook
- Copy the
Webhook Url
at the bottom
- Open the config screen:
- From the start screen:
Mods
, select Snitchcord on the left, then clickConfig
at the bottom left - From the Escape menu:
Mods config
, select Snitchcord on the left, then clickConfig
at the bottom left
- From the start screen:
- Paste the webhook url, change other options if you like
- Click
Done
so your changes are saved (don't hit Escape)
The {"content":"..."}
is necessary to tell Discord this is a text message.
You can change it to something else if you know the format.
All the <...>
will be replaced by various alert information:
Format key | Replacement examples | Optional? |
---|---|---|
<time> | 05:23 | |
<timeUTC> | 00:23 | |
<player> | Gjum | |
<snitch> | MySnitch | ✔ |
<group> | MyGroup | ✔ |
<longAction> | entered snitch at | ... | |
<shortAction> | Enter | Login | Logout | |
<nonEnter> | Login | Logout | ✔ |
<enter> | Enter | ✔ |
<login> | Login | ✔ |
<logout> | Logout | ✔ |
<world> | World | Nether | The End | |
<nonWorld> | Nether | The End | ✔ |
<coords> | -1234 56 -789 | |
<x> | -1234 | |
<y> | 56 | |
<z> | -789 | |
<roundedCoords> | -1230 60 -790 | |
<rx> | -1230 | |
<ry> | 60 | |
<rz> | -790 | |
<type> | Entry | Logging | ✔ |
<shortType> | E | L | ✔ |
<nonEntry> | Logging | ✔ |
<shortNonEntry> | L | ✔ |
Standard world names are replaced with their friendlier variants (see table).
You can put colons around optional format keys (nonEnter
, nonWorld
, etc.) that you'd like to be formatted only when they are shown.
For example, upon a snitch entry event, the output for alert format
{"content":"<player> @<nonEnter>@ at <snitch>"}
would be PLAYER @@ at SNITCHNAME
, which probably isn't what you want.
Instead, you can do
{"content":"<player>< @:nonEnter:@> at <snitch>"}
which would result in PLAYER at SNITCHNAME
.