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

Starboard #13

Open
gmacgre opened this issue Sep 27, 2022 · 8 comments · May be fixed by #96
Open

Starboard #13

gmacgre opened this issue Sep 27, 2022 · 8 comments · May be fixed by #96
Assignees
Labels
enhancement New feature or request

Comments

@gmacgre
Copy link
Contributor

gmacgre commented Sep 27, 2022

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.

@gmacgre gmacgre moved this from Ideas to Ready for dev in CS Bot Sep 27, 2022
@gmacgre gmacgre moved this from Ready for dev to Ideas in CS Bot Sep 27, 2022
@AverageHelper
Copy link
Contributor

We would need to plan out a database schema.

@AverageHelper
Copy link
Contributor

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.

@AverageHelper
Copy link
Contributor

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.

@gmacgre
Copy link
Contributor Author

gmacgre commented Sep 27, 2022

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.

@Plyb
Copy link
Contributor

Plyb commented Sep 27, 2022

I also think we should not remove posts that drop below the threshold as a way to prevent people from spamming the starboard

@Plyb
Copy link
Contributor

Plyb commented Sep 27, 2022

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

@Plyb
Copy link
Contributor

Plyb commented Sep 27, 2022

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

@JstnMcBrd JstnMcBrd added the enhancement New feature or request label Sep 28, 2022
@ZYancey
Copy link
Contributor

ZYancey commented Sep 28, 2022

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

@Plyb Plyb moved this from Ideas to Ready for dev in CS Bot Sep 29, 2022
@Plyb Plyb self-assigned this Apr 11, 2023
@Plyb Plyb moved this from Ready for dev to In Progress in CS Bot Apr 11, 2023
@Plyb Plyb linked a pull request Apr 15, 2023 that will close this issue
@Plyb Plyb moved this from In Progress to Code Review in CS Bot Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Code Review
Development

Successfully merging a pull request may close this issue.

5 participants