Expand the holiday-based comment reaction to cover more than just Halloween
thurisatic opened this issue ยท 1 comments
Description & Reasoning
While it's entertaining that Sir Lancebot reacts to comments containing certain words during Halloween (more accurately, all of October), it seems mildly unfair that this feature is specific to Halloween. Surely other events - notably Christmas - deserve such entertainment as well? This issue proposes adding more events to the reaction feature.
Proposed Implementation
Implementation involves upping the number of reactable "holidays" to 7, with some having a regex trigger resulting in one of a few randomly-chosen reactions:
- Valentines (discord reaction
:heart:
โค๏ธ) - Easter (
:rabbit:
๐ฐ or:rabbit2:
๐ ;:egg:
๐ฅ) - Earth Day (
:earth_africa:
๐:earth_americas:
๐ or:earth_asia:
๐) - Pride Month (
:rainbow_flag:
๐ณ๏ธโ๐) - Halloween (no change)
- Hanukkah (
:menorah:
๐) - Christmas (
:snowman:
โ or:snowman2:
โ๏ธ ;:snowflake:
โ๏ธ ;:santa:
๐ ;:christmas_tree:
๐ ;:deer:
๐ฆ
Other than Christmas, these are taken from pre-existing folders in thebot/exts/holidays
directory. In addition, the implementation would moveholidays/halloween/spookyreact.py
to an all-eventsholidays/holidayreact.py
, preventing the existence or need of very non-DRY near-duplicates in 7 different folders (and thus 7 Cogs).
Note a few things in this screenshot:
- The reaction for "snowman" is randomly chosen, but only one occurs per message
flake8
is excluded in the snowflake trigger regex (but this can be changed)- All November (just Hanukkah) and December (Hanukkah and Christmas) reactions are featured
- ๐ฆ on Discord is not the same as on GitHub - Discord's is a face-on view, GitHub's is in profile.
rainbow_flag
(๐ณ๏ธโ๐) is not in this image but also different, with Discord's having no flagpole - though this may change depending on OS and client.
Additional Details
While this does increase reaction coverage to half of the year, note that most months have few reactions and thus few triggers. Even those that do - Halloween and Christmas - are unlikely to generate sufficient reaction rates to become spammy.
Would you like to implement this yourself?
- I'd like to implement this feature myself
- Anyone can implement this feature
This sounds like a nice idea, some thoughts:
Some events (e.g. Hanukkah) happen at different dates on different years. Is the idea that we pick a rough range that is fixed for these e.g. the whole of december? (I think that would probably be the best option)
flake8 is excluded in the snowflake trigger regex (but this can be changed)
I'm sure this is what you meant anyway, but to confirm, we should match words exactly using \b
word boundary markers in the regex (how it already works) to avoid this rather than special casing matches to avoid.
While this does increase reaction coverage to half of the year, note that most months have few reactions and thus few triggers. Even those that do - Halloween and Christmas - are unlikely to generate sufficient reaction rates to become spammy.
Agree with this, and if it becomes an issue there are a bunch of things we'd be able to do (make regexes more strict, limit reactions to certain channels, reduce event durations).
I'll mark this as approved, feel free to open a PR if you're still interested!