Skip to content

First go at reaction duplication#50

Merged
AverageHelper merged 6 commits into
mainfrom
avg/dupe-reacts
Oct 16, 2022
Merged

First go at reaction duplication#50
AverageHelper merged 6 commits into
mainfrom
avg/dupe-reacts

Conversation

@AverageHelper
Copy link
Copy Markdown
Contributor

@AverageHelper AverageHelper commented Oct 14, 2022

New stuff:

  • The bot now duplicates some initial message reactions.
    • ⭐ is ignored
    • 1 in 5 chance for :same: and :no_u:
    • 1 in 100 for every other emoji
    • Emoji names are case-normalized (e.g. any capitalization of :same: will do)

I anticipate we can make these odds configurable once we have the database fleshed out. We'd need at least:

  • Some place to store the default reaction chance
  • Some place to store the names and off-chances of each special emoji
  • Some way to tie those emoji to the eventual X-board (to prevent the bot from affecting those stats) without excess database I/O

Closes #24

@AverageHelper AverageHelper requested a review from a team October 14, 2022 03:14
@AverageHelper AverageHelper self-assigned this Oct 14, 2022
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 14, 2022

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
97.68% (+1.53% 🔼)
505/517
🟢 Branches
92.55% (+4.88% 🔼)
149/161
🟢 Functions
95.95% (+1.43% 🔼)
71/74
🟢 Lines
97.62% (+1.57% 🔼)
493/505
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / messageReactionAdd.ts
100% 93.33% 100% 100%
🟢
... / reactionDuplication.ts
100% 100% 100% 100%

Test suite run success

138 tests passing in 26 suites.

Report generated by 🧪jest coverage report action from 5364368

@AverageHelper AverageHelper changed the title First go at emoji duplication First go at reaction duplication Oct 14, 2022
@JstnMcBrd
Copy link
Copy Markdown
Contributor

Might be best to put the DEFAULT_CHANCE and odds in the constants file, at least for now.

@AverageHelper AverageHelper requested a review from a team October 14, 2022 15:40
@AverageHelper AverageHelper merged commit 8ffcbce into main Oct 16, 2022
@AverageHelper AverageHelper deleted the avg/dupe-reacts branch October 16, 2022 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Reaction duplication

3 participants