-
-
Notifications
You must be signed in to change notification settings - Fork 89
Up- and down-voting on suggestions #385
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
Conversation
application/src/main/java/org/togetherjava/tjbot/commands/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wops
application/src/main/java/org/togetherjava/tjbot/commands/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
@marko-radosavljevic I dont quite follow your suggestion regarding custom emojis only the bot can use. The point of pre-adding the votes is to make it easier and more obvious for users how the system works. I.e. they can just click on one of the existing votes. I mean sure, we can replace that by other emojis but why should only the bot be allowed to react? Or what did you mean? |
@marko-radosavljevic if you didn't know, you can press on "jump" to "jump" to the old message. |
Yeah, sorry, obviously other people should be able to react with the same emote. :D I'm mostly thinking about having a custom upvote/downvote, just so it's more obvious that it's our 'special' button for voting. Can be confusing to a person unfamiliar with the system if there are 15 reactions on the suggestion, and they are all very common emojis. It would be best if only 2 emotes were possible for each suggestion, but it's probably something we can't control with the current system. Edit: To be really concrete, and avoid misunderstanding. What I'm suggesting is, add one of these as new emoji on the server, with name :approve-suggestion: or similar. Oh, I didn't know this, that's exactly what I need. :D I notice some of them don't have jump button, but thanks, will experiment more with it. ❤️ |
@marko-radosavljevic Added custom emotes (via config) with fallbacks. |
Kudos, SonarCloud Quality Gate passed! |
application/src/main/java/org/togetherjava/tjbot/commands/basic/SuggestionsUpDownVoter.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overview
Implements and closes #375. Added a message listener
SuggestionsUpDownVoter
which listens to all messages in suggestion channels (config) and reacts with an up- and down-vote to them:The emotes are configurable and fallback to the default 👍 and 👎 in case the server does not have them (together with a logger warning).
Config
The config had to be adjusted for this, please add the following (see the adjusted
config.json.template
):