HomeJavaModsThemisToDiscord | Themis Anti Cheat Discord Notifications Addon
ThemisToDiscord | Themis Anti Cheat Discord Notifications Addon
ModsJava

ThemisToDiscord | Themis Anti Cheat Discord Notifications Addon

⬇ Download on Spigot
Sends an embedded Themis notification to a discord webhook.

This is an unofficial addon and is not affiliated with the Themis project in any compacity.

Installation

Depends on Themis. If you want to use the %os% placeholder in the config file you will also need Floodgate.
  1. Place the ThemisToDiscord.jar file in your /plugins folder.
  2. Start or restart the server
  3. Run /ttd url <webhookUrl> (replace <webhookUrl> with your webhook url)
  4. Configure your messages if necessary following modifications with /ttd reload
  5. Optionally, test your messages by running their respective commands
    Code (Text):
    /ttd msg <message> <player:player_name> <type:detection_type> [score:score] [ping:ping] [tps:tps]
    to ensure the setup is functioning

Handling

You can create as many messages as you need/want. For each message you have the option to define the handling.

To do this, you use the same thresholds and delays included in the Themis configuration.

Code (YAML):
 default :
    # Define whether ThemisToDiscord should handle sending this message
    # Disable handling if you add this message's command to your Themis action(s)
    Handling
:
      Enabled
: true
      # What is the minimum score for a notification to be sent to the discord?
      execution-threshold
: 10.0
      # What amount of new violations need to happen before another notification is sent?
      repetition-threshold
: 5.0
      # What amount of time needs to pass before another notification is sent?
      repetition-delay
: 10.0
Should this option be missing or disabled, ThemisToDiscord will not handle sending the message.

This means the only way for the message to be sent would be the corresponding command:

Code (Text):
/ttd msg <message> <player:player_name> <type:detection_type> [score:score] [ping:ping] [tps:tps]

A simple example of having Themis handle the message would be to disable handling in the ThemisToDiscord configuration and then place the message's command in a Themis action such as the following:

Code (YAML):
 actions :
    # What is the name of the action? This name needs to be unique.
    notify
:
      # What is the minimum score for Themis to run this action?
      execution-threshold
: 10.0
      # Which amount of new violations need to happen for this action to be repeated?
      repetition-threshold
: 5.0
      # Which amount of time needs to pass for this action to be repeated?
      repetition-delay
: 10.0
      # Which commands should be run? You can specify as many as you'd like which will be run in the order they're listed.
      # Currently, you can use the following placeholders: %player_name%, %detection_type%, %score%, %ping%, %tps%
      commands
:
       - "themis notify §5[Themis] §4%player_name% §cwas flagged for §4%detection_type% §chacks!\n§c[Score: §4%score% §c| Ping: §4%ping% §c| TPS: §4%tps%§c]"
        - "ttd msg example player:%player_name% type:%detection_type% score:%score% ping:%ping% tps:%tps%"
JSON

You can specify the actual JSON message that will be sent to Discord via the webhook url. This is great for designing messages with https://discohook.org.

A small example:

Code (YAML):
    # Defines the json data used to construct the message
    # This is useful if you want to design your message/embed with https://discohook.org/
    # All other options are ignored if json is provided
    Json
: >
     {
        "content": "Hello this is an example of including a JSON string!",
        "embeds": [
          {
            "title": "JSON Example",
            "description": "A little example of using JSON in a ThemisToDiscord message.",
            "color": 5055373,
            "fields": [
              {
                "name": "Example Field",
                "value": "Did you know, all placeholders will work inside JSON too!",
                "inline": true
              },
              {
                "name": "Another Field",
                "value": "This is another field!",
                "inline": true
              }
            ],
            "author": {
              "name": "%player_name%",
              "icon_url": "%avatar_url%"
            }
          }
        ],
        "attachments": []
      }
It is important to note that all other options (beside webhook urls) will be ignored should JSON be provided.

Spoiler: What is a webhook? How do I create one?

Example Embeds (Completely Customizable)

[​IMG] [​IMG]
[​IMG] [​IMG]
[​IMG] [​IMG] [​IMG] [​IMG]

All the colors are modifiable in the config file!!!

Permissions

themistodiscord.ttd
description: Allows access to the /ttd command
default: op


Support

The worst way to try and get support is by leaving a review!


The best way to get support would be to post an issue on GitHub or join the Discord.

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

ThemisToDiscord | Themis Anti Cheat Discord Notifications Addon is a free Minecraft Java mod. Compatible with Minecraft 1.17, 1.18, 1.19, 1.20 and newer. Downloaded 1,028 times (via Spigot). Download it and open it directly in the game.

Explore more