Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Allow configuring which types of messages get sent as webhook for Discord

Open x86-39 opened this issue 3 years ago • 1 comments

Information

This PR partially closes https://github.com/EssentialsX/Essentials/discussions/5155

Details

Proposed feature:
Allow configuring which types of messages get sent as a webhook.

Currently when enabling the webhook feature all player specific messages get sent as a webhook. This may not always be desired since this also includes joining the server, deaths, advancements etc.

Environments tested:

OS: Fedora 36

Java version: 17.0.5

  • [ ] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • [x] CraftBukkit/Spigot/Paper 1.12.2
  • [ ] CraftBukkit 1.8.8 Don't see how this could differ on other server versions.

Demonstration:

This should send all messages as the normal bot user still, but leave chat messages, afk messages and actions as the player. (Chat messages use a different code path and can't be configured like this, neither can server messages obviously)

send-types-as-player:
  join: false
  # Leave messages sent when a player leaves the Minecraft server.
  first-join: false
  # Leave messages sent when a player leaves the Minecraft server.
  leave: false
  # Death messages sent when a player dies on the Minecraft server.
  death: false
  # AFK status change messages sent when a player's AFK status changes.
  afk: true
  # Achievement/advancement messages sent when a player is awarded an achievement/advancement.
  advancement: false
  # Action messages sent when a player runs the /me or /action commands.
  action: true

image

(first-join option is from https://github.com/EssentialsX/Essentials/pull/5160) (placeholder in username is from https://github.com/EssentialsX/Essentials/pull/5159)

x86-39 avatar Nov 16 '22 12:11 x86-39

Hey @pop4959, this PR has been open for 1.5 years now, do you have the chance to look at this and potentially merge it?

x86-39 avatar Jun 03 '24 17:06 x86-39