python-discord/sir-lancebot

"Christmas tree" holiday reaction reacts to just "tree"

Anonymous4045 opened this issue · 1 comments

Description

Certain links, specifically ones with ../tree/.., are reacted to with Christmas trees.

Steps to Reproduce

Send a link to a GitHub directory in a channel where the bot reacts.

Expected Behaviour

The bot to... not do that.

Actual Behaviour

IMG_0836

Known Impacted Platforms

  • Web
  • Desktop
  • Android App
  • iOS App

Possible Solutions

Exclude links from being parsed for keywords.

Additional Details

Would you like to implement a fix?

Note: For high-priority or critical bugs, fixes may be implemented by staff.

  • I'd like to implement the bug fix
  • Anyone can implement the bug fix

Here is the code in question:

"christmas tree": Trigger(r"\b((christ|x)mas|tree)\b", ["\U0001F384"]),

It's matching on christams|tree, so it will match on every tree, regardless of it's festivity. It'll even match on the Grinch's trees! This is obviously extremely worrisome, we don't want the Grinch anywhere near our festivities!! This is a MUST FIX issue!!!