sir-lancebot
sir-lancebot copied to clipboard
Add a space before "tree" in the "christmas" tree holiday reaction
Relevant Issues
~~This is one possible solution to #1403. I'll leave the floor open for discussion over other options.~~ Looks like this is the solution that fits! Closes #1403
Description
christmas|tree -> christmas| tree to make sure that we only react to trees of the non-linked variety.
regex101 screenshots
Did you:
- [x] Join the Python Discord Community?
- [x] Read all the comments in this template?
- [x] Ensure there is an issue open, or link relevant discord discussions?
- [x] Read and agree to the contributing guidelines?
Per discussion on Discord, it looks like we're okay still reacting to most trees, just not when they're in a link. I suppose this is a good compromise. We really shouldn't discriminate, lest we become grinches ourselves. I'd like to go ahead and close the comment floor and open up the review floor.
Are we certain we don't mind most trees? A lot of trees can be stated that have no relation to the season itself. "Grinch's tree", sure, but then what about "skeleton tree"? That will still react with a tree; the regex matches, but that's for halloween.
If we're going to activate it for Christmas, I'd rather you match for christmas/xmas then lookahead for tree.
Updated to only react specifically to trees of the Christmas variety.
Screenshot:
is that a problem? a christmas tree seems to a good reaction for christmas, and it's the only one present
I think making the trees group optional makes this match on just "christmas".
That's also the current behavior of the regex.
In that case there's no point mentioning tree in the regex, it can just have the christmas bit