Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow toggling SUPPRESS_NOTIFICATIONS for some message types sent to Discord #5935

Open
jtopian opened this issue Sep 15, 2024 · 0 comments
Open
Labels
type: enhancement Features and feature requests.

Comments

@jtopian
Copy link

jtopian commented Sep 15, 2024

Feature description

I would like to be able to set certain message types so that they are sent to Discord with the SUPPRESS_NOTIFICATIONS message flag.

This would be a property in the config.yml that would accept a list of message types:

# To disable a message from showing, use 'none' as the channel name.
message-types:
  # Join messages sent when a player joins the Minecraft server for the first time. This type is sent instead of the join type.
  first-join: primary
  # Join messages sent when a player joins the Minecraft server.
  join: primary
  # Leave messages sent when a player leaves the Minecraft server.
  leave: primary
  # Chat messages sent when a player chats on the Minecraft server.
  chat: primary
[...cutting out a bunch for space...]

# Add message-types from above to the following list to suppress notifications in discord
suppress-notifications:
  - join
  - leave

then somewhere around the public class DiscordChatMessageEvent, check if the message type matches the list and add the flag before submitting the message to the Discord API.

How the feature is useful

This would help prevent messages like joins and quits from spamming notifications to Discord channel members, who might otherwise mute the channel completely to remove the noise.

@jtopian jtopian added the type: enhancement Features and feature requests. label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Features and feature requests.
Projects
None yet
Development

No branches or pull requests

1 participant