feat: module starboard personnalisable#154
Draft
RedsTom wants to merge 13 commits into
Draft
Conversation
Reposte les messages populaires dans un salon dédié quand ils reçoivent assez de réactions. Supporte plusieurs émois (dont customs), configuration par seuil, auto-star, et salons surveillés.
- Add optional chaining to prevent crash in guildId resolution - Add fallback for message.guild/message.guildId (handles messageReactionAdd/Remove events where the reaction object doesn't have a direct .guild property) - Remove incorrect arg.roles check (GuildMember.id is user ID, not guild ID) - Fix missing .guildId accessor on the guildId fallback
4b167fd to
7578496
Compare
7578496 to
5478c37
Compare
…te, message removal - Add reactions JSON column to StarboardEntry model - Replace computeStarCount with computeReactionMetrics (per-emoji + unique users) - buildStarboardEmbed now shows inline fields per emoji + total unique footer - createStarboardEntry reacts with all matching emojis - updateStarboardEntry updates embed and syncs reactions - removeStarboardEntry deletes the starboard message
e31d810 to
60d6299
Compare
Add Partials to Client constructor and ConfigProvider import to starboard listeners for self-star feature.
- Replace legacy embed with Discord components v2 containers - Add reply container with attachment indicator and inline button - Fix concurrent reaction race condition (P2002 handler) - Filter author reactions when selfStar is disabled - Replace plain text name with author ping in headers - Use h2 for reaction line and header
…lor fallback - Extract duplicate threshold branching into applyMetrics method - Rename reactionCount → uniqueUserCount in Prisma schema - Add fallback for EMBED_COLORS lookup - Reorder DB check before metrics computation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #152
Module starboard entièrement personnalisable, utilisant Discord Components v2.
Fonctionnement
Apparence (Components v2)
Deux containers sont utilisés quand le message original répond à un autre message :
Container de réponse (si reply)
Container du message original
Configuration (par serveur)
starboardChannelreactionEmojis<:id>ou nom)reactionCountselfStarignoreBotMessagesallowedChannelsbelowThresholdBehaviorremoveoukeepquand le score repasse sous le seuilembedColorStructure
Technique
{ err }