discord.yml
Allows sending messages to Discord server channels when a punishment occurs via webhooks.
Platform | Location |
---|---|
CraftBukkit/Spigot/Paper | /plugins/BanManager/discord.yml |
BungeeCord | /plugins/BanManager/discord.yml |
Fabric | /config/banmanager/discord.yml |
Sponge | /config/banmanager/discord.yml |
Velocity | /plugins/BanManager/discord.yml |
hooks
enabled
- Set to true to enable discord integration, defaults tofalse
punishments
ban
url
- The Discord webhook url, see the official Discord documentation on how to generate oneignoreSilent
- Set to false to send silent punishments, defaults to truepayload
- The JSON payload in a YAML format to send to Discord. See the Discord Developer Docs for all fields
Example
# More info at https://banmanagement.com/docs/banmanager/configuration/discord-yml
hooks:
enabled: false
punishments:
ban:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[player] banned'
description: '[reason]'
color: 10033947
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
tempban:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[player] banned'
description: '[reason]'
color: 15680580
fields:
- name: Duration
value: '[expires]'
inline: true
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
unban:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[player] unbanned'
description: '[reason]'
color: 2278750
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
banip:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[ip] Banned'
description: '[reason]'
color: 10033947
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
tempbanip:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[ip] banned'
description: '[reason]'
color: 15680580
fields:
- name: Duration
value: '[expires]'
inline: true
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
unbanip:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[ip] Unbanned'
description: '[reason]'
color: 2278750
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
kick:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[player] kicked'
description: '[reason]'
color: 16776960
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
mute:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[player] muted'
description: '[reason]'
color: 3616931
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
tempmute:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[player] muted'
description: '[reason]'
color: 6514417
fields:
- name: Duration
value: '[expires]'
inline: true
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
unmute:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[player] unmuted'
description: '[reason]'
color: 2278750
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
tempwarning:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[player] warned'
description: '[reason]'
color: 16096779
fields:
- name: Duration
value: '[expires]'
inline: true
- name: Points
value: '[points]'
inline: true
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
warning:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[player] warned'
description: '[reason]'
color: 9584654
fields:
- name: Points
value: '[points]'
inline: true
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
report:
url: 'https://discord.com/api/webhooks/changeMe'
ignoreSilent: true
payload:
embeds:
- title: '[player] reported'
description: '[reason]'
color: 16737894
fields:
- name: '[player] location'
value: '[playerX] [playerY] [playerZ] [playerPitch] [playerYaw] [playerWorld]'
inline: true
- name: '[actor] location'
value: '[actorX] [actorY] [actorZ] [actorPitch] [actorYaw] [actorWorld]'
inline: true
author:
name: BanManager
url: 'https://banmanagement.com'
icon_url: 'https://banmanagement.com/images/banmanager-icon.png'
footer:
text: 'By: [actor]'
icon_url: 'https://crafthead.net/helm/[actorId]/128'
thumbnail:
url: 'https://crafthead.net/helm/[playerId]/128'
Previous BanManager versions
Versions prior to v7.10 only support Bukkit via DiscordSRV and Sponge via MagiBridge. The documentation below exists for users on older versions. This has been removed in later versions and it is recommended you migrate to webhooks.
enabled
- Set to true to enable discord integration, defaults tofalse
messagesFromActor
- Set to true to show punishment messages as if they were sent by the minecraft user, defaults totrue
punishments
ban
The Discord channel name (forchannel
DiscordSRV
) or ID (forMagiBridge
) of the Discord channel. ForDiscordSRV
, this name must specified underChannels
in your DiscordSRV config.yml, i.e.
# The first part of channel pairs is not the Discord channel name! Channels: {"global": "219559668236681217", "punishments": "221419146028646402"}
message
- Supports Discord Markdown, use\n
to represent a new lineignoreSilent
- Set to false to send silent punishments, defaults to true
Example
enabled: true
messagesFromActor: true
punishments:
ban:
channel: 'punishments'
message: "[player] has been permanently banned\nBy: [actor]\nReason:[reason]"
ignoreSilent: true
tempban:
channel: 'punishments'
message: "[player] has been temporarily banned for [expires]\nBy: [actor]\nReason:[reason]"
ignoreSilent: true
unban:
channel: 'punishments'
message: "[player] has been unbanned\nBy: [actor]\nReason:[reason]"
banip:
channel: 'punishments'
message: "[ip] has been permanently banned\nBy: [actor]\nReason:[reason]"
ignoreSilent: true
tempbanip:
channel: 'punishments'
message: "[ip] has been temporarily banned for [expires]\nBy: [actor]\nReason:[reason]"
ignoreSilent: true
unbanip:
channel: 'punishments'
message: "[ip] has been unbanned\nBy: [actor]\nReason:[reason]"
kick:
channel: 'punishments'
message: "[player] has been kicked\nBy: [actor]\nReason:[reason]"
ignoreSilent: true
mute:
channel: 'punishments'
message: "[player] has been permanently muted\nBy: [actor]\nReason:[reason]"
ignoreSilent: true
tempmute:
channel: 'punishments'
message: "[player] has been temporarily muted for [expires]\nBy: [actor]\nReason:[reason]"
ignoreSilent: true
unmute:
channel: 'punishments'
message: "[player] has been unmuted\nBy: [actor]\nReason:[reason]"
warning:
channel: 'punishments'
message: "[player] has been warned\nBy: [actor]\nReason:[reason]"
ignoreSilent: true