-
Notifications
You must be signed in to change notification settings - Fork 2
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
Starboard #13
Comments
We would need to plan out a database schema. |
Since messages have been known to enter and leave the starboard, and the star threshold is variable, we should keep careful track of the starboard's state in relation to the messages in the starboard channel. We should take care to avoid Ze Kaiser's problem of duplicate starboard posts. |
We should avoid hard-coding the starboard channels and star thresholds per guild. Since slash commands have excellent channel-selection support, we should create an admin command interface to set the appropriate channel and limits. |
I'd imagine that at a high level, we would have basically two tables for this and a one-to-many relationship. The first would be for the guilds that the server is in, with a number indicating the threshold for a post to hit that guild's board. Additionally, it would have a collection of keys to the second table, which is a record of posts that have hit the board. This doesn't need to be much more than the link to the post itself, since we can hit the API for any more information. When a post reaches the guild threshold, we can check our posts associated with the guild and simply check to see if the link is in our records. If we get a match, simply update the old post. |
I also think we should not remove posts that drop below the threshold as a way to prevent people from spamming the starboard |
This should allow for easily changing the threshold without resetting the bot so that it posts new messages. We want it to continue to just edit the old messages after the threshold is changed |
At some point in the future, I'd also like to add a sort of reaction-board that includes all reactions, not just stars. That is not for this ticket, but something maybe to keep in mind as it might affect how we do the architecture |
Setting the threshold should be able to be set through a slash command imo, seconding what has been said above it should be easy to later change the starboard threshold on a per channel/server basis. Its been mentioned as a future enhancement to have some sort of xp system, that could result in a system to dynamically scale the star threshold depending on channel size/activity. But thats a problem for future us |
A starboard is a channel where the bot will repost messages that have gotten a certain number of a particular reaction. The bot will post a copy of the message, along with the author, a link to the original message, a count of how many of the reaction are on the post, and what channel the message was in. When the post reaches the set threshold, it will be added to the starboard channel. From that point on, the reaction count will be updated any time someone adds or removes the specified reaction. Posts that reach the threshold then dip below it are not removed from the starboard.
/set-starboard <channel> <threshold> [emoji]
sets which channel starboard is posted in, how many reacts are required, and what emoji is being tracked (defaults to ⭐).Multiple starboards may be set per guild. If
set-starboard
is used on a channel that already has a starboard, the old settings will be overridden. This should allow for changing the threshold without causing a "reset" in the board (i.e. all the old starboard messages should remain and continue to be updated, and new ones should not be posted if that message was already on the board). For simplicity, changing the emoji of a starboard is not supported.If an emoji is currently being used on any starboard in the guild, the bot prevents users from reacting to their own messages with that emoji.
If an admin deletes a message in a starboard, and the source message recieves a new reaction, the bot re-posts the message.
The text was updated successfully, but these errors were encountered: