Skip to content

Gjum/Snitchcord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snitchcord

Sends Snitch alerts to a Discord channel

How to Use

  1. Install the latest .jar (uses Forge)
  2. 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
  3. Open the config screen:
    • From the start screen: Mods, select Snitchcord on the left, then click Config at the bottom left
    • From the Escape menu: Mods config, select Snitchcord on the left, then click Config at the bottom left
  4. Paste the webhook url, change other options if you like
  5. Click Done so your changes are saved (don't hit Escape)

config options screenshot of v2.0.0

Alert Formatting

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).

Optionals

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.

Travis build Status

About

Send Snitch alerts to Discord using Webhooks

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages