Skip to content

Conversation

@christolis
Copy link
Member

Problem

Recently from the server suggestions, many people have been slightly upset that the only reaction emoji considered for adding to the quotes board is the default star emoji.

Some members have suggested specific additional emojis to be considered, others suggested that the star emoji should have a weight of 1.0 while the rest of the emojis should have a weight of 0.5. While both solutions can work, all emojis can have a custom weight for the purpose of customizability.

Solution

Introduce a scoring concept for each emoji, configurable for each particular one, and provide the ability to set a default value if an emoji is not defined in the configuration file.

For those who are wondering, any kind of emoji that Discord can handle is able to be added in the configuration, including custom emojis in the server. JDA can keep track of those.

For adding a unicode emoji, the actual unicode value has to be provided, like it has been done in config.json.template.

For adding a guild emoji, a "code" for the emoji has to be provided, for instance:

youtube:1464573182206804010

Which stands for the friendly name of the emoji, a colon right after, and finally the ID of the custom emoji.

The "config.json.template" is NOT exhaustive, more emojis have to be added and some others removed according to preference.

Configuration changes

quoteBoardConfig

Property Description Type Default
quoteBoardConfig.minimumScoreToTrigger The minimum amount of reaction score for a message to be quoted. float 5.0
quoteBoardConfig.channel The pattern for the board channel. String "quotes"
quoteBoardConfig.botEmoji The emoji with which the bot will mark quoted messages. String
quoteBoardConfig.defaultEmojiScore The default score of an emoji if it's not in the emojiScores map. float 0.5
quoteBoardConfig.emojiScores A map of each emoji's custom score. Map<String, Float> see below

emojiScores Map

⚠️ Note: This is just an example for you to get an idea of how you could utilize this configuration property and you are encouraged to edit it to the server's needs.

{
  "😬": -0.5,
  "💔": -0.5,
  "🖕": -0.5,
  "👎": -0.5,
  "🤨": -0.5,

  "🇷🇺": 0.0,
  "🇵🇸": 0.0,
  "🇮🇱": 0.0,

  "⭐": 1.0,

  /* Custom emoji */
  "youtube:1464573182206804010": 0.0
}

Recently from the server suggestions, many people have been slightly upset
that the only reaction emoji considered for adding to the quotes board is
the default star emoji.

Some members have suggested specific additional emojis to be considered,
others suggested that the star emoji should have a weight of 1.0 while
the rest of the emojis should have a weight of 0.5. While both solutions
can work, all emojis can have a custom weight for the purpose of
customizability.

Introduce a scoring concept for each emoji, configurable for each
particular one, and provide the ability to set a default value if an emoji
is not defined in the configuration file.

For those who are wondering, _any_ kind of emoji that Discord can handle
is able to be added in the configuration, including custom emojis in the
server.  JDA can keep track of those.

For adding a unicode emoji, the actual unicode value has to be provided,
like it has been done in "config.json.template".

For adding a guild emoji, a "code" for the emoji has to be provided, for
instance:

    youtube:1464573182206804010

Which stands for the friendly name of the emoji, a colon right after, and
finally the ID of the custom emoji.

The "config.json.template" is _NOT_ exhaustive, more emojis have to be
added and some others removed according to preference.

Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>
@christolis christolis added the enhancement New feature or request label Jan 24, 2026
@christolis christolis requested a review from a team as a code owner January 24, 2026 12:07
@christolis christolis added priority: normal config-changes if your PR contains any changes related to config file java Pull requests that update java code labels Jan 24, 2026
Comment on lines +217 to +220
"🇷🇺": 0.0,
"🇵🇸": 0.0,
"🇮🇱": 0.0,
"🏳️‍🌈": 0.0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should keep this politically influenced example in the repo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in Discord, it's an example, it's made to prove a point for the person setting the configuration, to give them an idea on how to provide scores for each emoji. It's intentionally there to evoke an emotion, and all of these flags have a flag of 0 to maintain neutrality. No flag is more powerful than the other, at least none of the flags commonly used as reactions to offend in 2026.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My tip: Avoid flag reactions

Copy link
Contributor

@firasrg firasrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christolis Thank you for this update, please check my reviews, thank you

},
"quoteBoardConfig": {
"minimumReactionsToTrigger": 5,
"minimumScoreToTrigger": 5.0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to put it decimal

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@firasrg Just curious: what happens if we want half-point scoring later (like the 0.5 for non-star emojis)?

@@ -195,9 +195,34 @@
"pollIntervalInMinutes": 10
},
"quoteBoardConfig": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should ignore some text channels like announcements, and hall-of-fame, github-activity-logs, vps-status, bots and the likes, because they are not intended for such a feature, consider to put a config attribute to list them here


"⭐": 1.0,

"youtube:1464573182206804010": 0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I know this is an example, it's better to add a custom emoji ID from the server TJ for more consistency

.queue(message -> markAsProcessed(message).flatMap(v -> message.forwardTo(boardChannel))
.queue(_ -> logger.debug("Message forwarded to quote board channel: {}",
boardChannel.getName())),
if (emojiScore < config.minimumScoreToTrigger()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a log.debug can help here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config-changes if your PR contains any changes related to config file enhancement New feature or request java Pull requests that update java code priority: normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants