Skip to content

Implement reaction statistics#236

Merged
bristermitten merged 7 commits intoTheDeveloperDen:masterfrom
Pdzly:feature/230-reaction-statistics
Mar 18, 2026
Merged

Implement reaction statistics#236
bristermitten merged 7 commits intoTheDeveloperDen:masterfrom
Pdzly:feature/230-reaction-statistics

Conversation

@Pdzly
Copy link
Copy Markdown
Contributor

@Pdzly Pdzly commented Mar 3, 2026

Add statistics about reactions

grafik

…tats

- Track emoji reactions via messageReactionAdd event with deduplication
- Add /reactionstats command with user, global, and messages subcommands
- Support time-period filtering (day/week/month/year/all)
- Add ReactionStat model with optimized indexes for query performance
- Document database schema changes in DB_CHANGES.md
…in stats

- Add `formatEmojiForEmbed` utility to handle custom emoji normalization and external fallback.
- Update `/reactionstats` command to display emojis with improved formatting logic.
- Introduce custom emoji rendering check (`canRenderCustomEmoji`) for guilds.
- Add tests for `formatEmojiForEmbed` to ensure accurate emoji rendering and fallback behavior.
- Refactor code to replace `formatEmoji` with `formatEmojiFor
@Pdzly Pdzly requested a review from bristermitten March 3, 2026 12:22
@bristermitten
Copy link
Copy Markdown
Member

Fix failing tests and we should be good

…mpatibility

SQLite's Sequelize dialect serializes BigInt values with an "n" suffix
(e.g. "10n"), causing raw query results to return strings instead of
actual BigInts. This broke aggregate queries in getGlobalStats,
getTopMessages, and getUserStats when running under SQLite (CI).
@Pdzly
Copy link
Copy Markdown
Contributor Author

Pdzly commented Mar 15, 2026

The issue is that the test is running on workflow on sqlite and on local on postgresql

@bristermitten bristermitten merged commit fbd98d7 into TheDeveloperDen:master Mar 18, 2026
8 checks passed
@Pdzly Pdzly deleted the feature/230-reaction-statistics branch March 18, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants