-
Notifications
You must be signed in to change notification settings - Fork 65
Webhook
Enable to send messages as alerts to other platforms.
You can edit them at end of config.yml
file. To check if they are working, use /n webhook
.
All webhooks have similar configuration:
- You can disable a type by set
enabled
to false. - You can change the cooldown for each type with
cooldown
.
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.
So, this is all options :
-
username
: The name used for the webhook sender. Default: "Negativity" -
content
: The content which is sent like a basic message. Default: "" -
avatar_url
: The avatar used for the message sender. Default: "https://www.spigotmc.org/data/resource_icons/86/86874.jpg"
To add embed content, you have to create an embed
section.
But, what is embed ? This is an 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 calledname
, and alink
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
-
You need 2 things: the bot token (who send the message) and the chat id (where send it).
- The bot token :
- DM
@BotFather
- Do /start
- Answer to questions
- Do /token
- Here you have the token ! Now use it and keep it safely.
-
The chat id : You can lot of way to do get it, but mostly you can invite bot that said the ID. For example
@raw_data_bot
It failed to send message to the given ID.
- Check by going to
https://api.telegram.org/bot<TOKEN>/getme
. If you have good result, the issue is from the chat id. - Try with "-" or "+" at begin of chat id. If can help to find if it's a personnal discussion or group one.
In writing...
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
For alert, there is a specific content possible: content_first
. It's the content
message, but showed only for the first time the player create webhook. It's made to write specific message, tag some roles or users. If not present, the content
message will be used.
Placeholders available for alert message only :
-
%cheat%
: the cheat name -
%amount%
: Amount of alert made by player -
%reliability%
: Reliability of the cheat
Placeholders available for report message only :
-
%reason%
: The reason of the ban
Placeholders available for kick message only :
-
%reason%
: Name of the banned player
Placeholders available for report message only :
-
%reason%
: Name of the banned player
You can ask for new webhook support.
Welcome to Negativity's wiki !