Skip to content

RagingTech/ThemisToDiscord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThemisToDiscord

Sends an embedded Themis notification to a discord webhook.

Installation

Depends on Themis

  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. Optionally, run /ttd test to ensure the setup is functioning

Alternatively, editing the config file located at /plugins/ThemisToDiscord/config.yml and then running /ttd reload is a suitable replacement for step 3.

Default Colors

All of these colors can be modified via the config file.

Check Type Hex Color Textual Color
Boat Movement #875229 Light Brown
Flight / Y-Movement #3276bf Light Blue
Speed #d6e600 Neon Yellow
Spoofed Packets #ff0000 Neon Red
Timer / Blink #d61ad6 Neon Pink
Reach #6f1ad6 Neon Purple
Elytra Flight #afaeb0 Light Gray
Illegal Packets #141414 Black Shade

Example Embeds

Boat Movement Flight / Y-Movement Speed Spoofed Packets Timer / Blink Reach Elytra Flight Illegal Packets

Alternatives

For servers with DiscordSRV installed this plugin may not be necessary.

DiscordSRV comes with the command /discordsrv broadcast [#ChannelID/#ChannelName] <Message> documented here.

It allows dispatching a message to the specified channel or if omitted to the main channel.

Therefore one could add the following to the actions key in their Themis configuration file to receive basic Discord notifications.

actions:
  ...
  # What is the name of the action? This name needs to be unique.
  discord:
    # 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:
      - "discordsrv broadcast #0000000000000000000 [Themis] **%player_name%** was flagged for *%detection_type%* hacks! [Score: %score% | Ping: %ping% | TPS: %tps%]"

You could simply copy the command to any existing Themis action as well.

This method was known well before the creation of this plugin. However, not all servers use DiscordSRV and ThemisToDiscord provides far more styling options including changing the name and avatar via webhook and sending color-coded embedded messages instead of plain generic ones.