Skip to content

Implement Quotes Board #1029

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

christolis
Copy link
Member

@christolis christolis commented Feb 21, 2024

Closes #1027.

Screenshots

image

Configuration changes

Property Description Type Default
coolMessagesConfig.minimumReaction The minimum amount of reactions needed
for the target message to
be considered to the board channel.
int 5
coolMessagesConfig.boardChannelPattern A pattern of the channel where messages
that should be quoted get posted to.
String "quotes"
coolMessagesConfig.reactionEmoji The reaction emoji as unicode. String "U+2B50"

@christolis christolis requested review from a team as code owners February 21, 2024 13:29
@Taz03 Taz03 marked this pull request as draft February 22, 2024 00:43
@christolis christolis marked this pull request as ready for review February 28, 2024 10:27
@christolis christolis force-pushed the feature/cool-messages branch from 4a68771 to bc3b7d6 Compare March 1, 2024 23:54
@christolis christolis marked this pull request as draft March 2, 2024 00:03
@christolis christolis marked this pull request as ready for review March 2, 2024 00:59
@christolis christolis requested a review from tj-wazei March 2, 2024 01:00
@christolis christolis force-pushed the feature/cool-messages branch from 35ba891 to 47cdcb2 Compare March 20, 2024 09:29
Copy link
Member

@Taz03 Taz03 left a comment

Choose a reason for hiding this comment

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

add a message about config changes on main pr message, moderators said its hard to keep track of it otherwise

@christolis christolis force-pushed the feature/cool-messages branch from 47cdcb2 to 6d86c8f Compare April 4, 2024 09:07
@christolis christolis requested a review from Taz03 April 4, 2024 09:43
Taz03
Taz03 previously approved these changes Apr 14, 2024
@christolis christolis force-pushed the feature/cool-messages branch from ed3dbd5 to 59dc245 Compare May 17, 2024 22:42
@ankitsmt211 ankitsmt211 added the config-changes if your PR contains any changes related to config file label May 18, 2024
@christolis christolis force-pushed the feature/cool-messages branch from 59dc245 to 35abd02 Compare October 6, 2024 11:44
@SquidXTV
Copy link
Member

maybe it makes more sense to implement this with the new forward feature in discord?

@christolis christolis force-pushed the feature/cool-messages branch from 35abd02 to 7b19538 Compare October 29, 2024 19:50
@christolis
Copy link
Member Author

maybe it makes more sense to implement this with the new forward feature in discord?

@SquidXTV This is now a feature! With the latest changes, we are now forwarding messages instead of embedding messages. Good suggestion :)

@christolis christolis force-pushed the feature/cool-messages branch 2 times, most recently from bbde421 to 7d839d6 Compare October 29, 2024 20:13
@SquidXTV
Copy link
Member

@SquidXTV This is now a feature! With the latest changes, we are now forwarding messages instead of embedding messages. Good suggestion :)

Good job <3
Maybe update the PR description (Screenshot) accordingly

@christolis
Copy link
Member Author

@SquidXTV This is now a feature! With the latest changes, we are now forwarding messages instead of embedding messages. Good suggestion :)

Good job <3 Maybe update the PR description (Screenshot) accordingly

Thank you! I have updated the PR description. Thanks for pointing it out!

SquidXTV
SquidXTV previously approved these changes Oct 30, 2024
@christolis christolis dismissed tj-wazei’s stale review October 30, 2024 10:19

All requests have been resolved

@christolis christolis requested a review from Taz03 October 30, 2024 10:20
tj-wazei
tj-wazei previously approved these changes Oct 30, 2024
@christolis christolis dismissed stale reviews from tj-wazei and SquidXTV via 9f303cd June 26, 2025 10:50
@christolis christolis force-pushed the feature/cool-messages branch 2 times, most recently from 9f303cd to 8407d3f Compare June 27, 2025 09:00
@suryatejess
Copy link

gonna help with this

@christolis christolis force-pushed the feature/cool-messages branch from 8407d3f to fb4fb5d Compare June 28, 2025 14:05
* minimumReactions-5, star symbol instead of encoding

* requests changes by zabuzard except for moving getBoardChannel down and markMessageAsProcessed

* Following JavaDocs guidelines of making the first letter capital

* code refactoring

* refactor: use correct method for reactionsCount

It turns out that for each event fired, every *single* damn time,
messageReaction.hasCount() would always return false. No matter what.
Terrible documentation from JDA's side. As a result, because of the
ternary operator:

    messageReaction.hasCount() ? messageReaction.getCount() + 1 : 1

the result of `reactionsCount` would always end up holding the value of
one.

In the following changes, we use `messageReaction.retrieveUsers()` to
get a list of the people reacted, get a `Stream<User>` from that and get
its count. Much more reliable this way and it also happens to be more
readable.

Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>
Co-authored-by: Chris Sdogkos <work@chris-sdogkos.com>
Co-authored-by: Surya Tejess <74978874+suryatejess@users.noreply.github.com>
@CLAassistant
Copy link

CLAassistant commented Jun 28, 2025

CLA assistant check
All committers have signed the CLA.

Since 1ade409 (refactor: code review addressed by Zabuzard,
2025-06-28) primarily contains a generaly vague JavaDoc describing what
the `QuoteBoardForwarder.java` class is doing, a more descriptive one
replaces it.

Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>
@christolis christolis requested a review from Zabuzard June 28, 2025 15:57
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
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

Cool messages board feature
8 participants