Skip to content

Webhook

Elikill58 edited this page Jun 15, 2022 · 6 revisions

Webhook

It's used to send message to others platforms at specific moments. For exemple, when player cheat/report/...

To use it, enable it in config by setting enable to true.

To check if they are working, use /n webhook.

Available webhooks types

There is currently only discord ...

Discord

Before starting, you need to create a new webhook on discord for the needed channel (Right click on channel -> 'Edit channel' -> 'Manage webhook' -> 'New webhook'). Then, put the URL into url value.

You can set a general cooldown between 2 messages from same player with cooldown (in millisecond). Set 0 to disable. (since 2.4.2)

Common behavior of all message type

Firstly, you can disable a type by set enabled to false.

You can change the cooldown for each type with cooldown. This override the global one -if specificied-. (since 2.4.2)

You can use some placeholders in all messages :

%name% : Name of the player which procude the message
%uuid% : UUID of the player which procude the message
%ip% : IP of the player which produce the message
%date% : Date when the player procude the message
%sender% : The sender of the message (such as banner or reporter)
%ping% : The ping of the player
%world% : The world of the player
%server_name% : The name of the server where the player is
%server_version% : Version of the server
%player_version% : Version of the player
%tps% : Actual server TPS

(If one or more placeholders are not available, upgrade to newer version)

So, this is all options :

  • username : The name used for the webhook sender.
  • content : The content which is sent like a basic message
  • avatar_url : The avatar used for the message sender

To add embed content, you have to create an embed section. But, what is embed ? This is an example:

Embed discord example

So, this is all embed options :

  • color : Color of the vertical line on the left. Should be an integer but write as string like "65280" for green (More infos)
  • title : The embed title
  • description : The main description of the message
  • fields : Configure all fields showed at the end of the message. (3/line max). This is all options for each fields :
    • key : The name of the field (show in bold)
    • value : The content of the field (show below the key, not in bold)
    • inline : If the message is inline or not
  • thumbnail : The thumbnail message
  • footer : Configure the footer. It's a section which can contains the content of the footer in a value called name, and a link which will make this footer clickable.
  • author : Finally, you can configure an author section is in composed of :
    • name : The author name
    • link : A link to the author
    • icon : A link to the icon picture

Alert

Placeholders available for alert message only :

  • %cheat% : the cheat name
  • %amount% : Amount of alert made by player
  • %reliability% : Reliability of the cheat

Ban

Placeholders available for report message only :

  • %reason% : The reason of the ban

Kick

Placeholders available for kick message only :

  • %reason% : Name of the banned player

Report

Placeholders available for report message only :

  • %reason% : Name of the banned player

Need new webhook ?

You can ask for new webhook support.

Clone this wiki locally