From 1871a062b6a1b0ae6e9eb2ff67072b48f9a3d8fc Mon Sep 17 00:00:00 2001 From: Bradley Reynolds Date: Sat, 2 Dec 2023 00:52:00 -0600 Subject: [PATCH 1/3] Replace or with space in christmas tree holiday reaction It's reacting to GitHub links that contain /tree/ --- bot/exts/holidays/holidayreact.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/holidays/holidayreact.py b/bot/exts/holidays/holidayreact.py index ef44115a2f..bd70b83144 100644 --- a/bot/exts/holidays/holidayreact.py +++ b/bot/exts/holidays/holidayreact.py @@ -61,7 +61,7 @@ class Holiday(NamedTuple): } ) Christmas = Holiday([Month.DECEMBER], { - "christmas tree": Trigger(r"\b((christ|x)mas|tree)\b", ["\U0001F384"]), + "christmas tree": Trigger(r"\b((christ|x)mas tree)\b", ["\U0001F384"]), "reindeer": Trigger(r"\b(reindeer|caribou|buck|stag)\b", ["\U0001F98C"]), "santa": Trigger(r"\bsanta\b", ["\U0001F385"]), "snowflake": Trigger(r"\b(snow ?)?flake(?! ?8)\b", ["\u2744\uFE0F"]), From f037d4d43348130fbe8c439dcb09bbcb13099052 Mon Sep 17 00:00:00 2001 From: Bradley Reynolds Date: Sat, 2 Dec 2023 01:11:08 -0600 Subject: [PATCH 2/3] Add the or back in, but keep the space --- bot/exts/holidays/holidayreact.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/holidays/holidayreact.py b/bot/exts/holidays/holidayreact.py index bd70b83144..6cc41450ea 100644 --- a/bot/exts/holidays/holidayreact.py +++ b/bot/exts/holidays/holidayreact.py @@ -61,7 +61,7 @@ class Holiday(NamedTuple): } ) Christmas = Holiday([Month.DECEMBER], { - "christmas tree": Trigger(r"\b((christ|x)mas tree)\b", ["\U0001F384"]), + "christmas tree": Trigger(r"\b((christ|x)mas| tree)\b", ["\U0001F384"]), "reindeer": Trigger(r"\b(reindeer|caribou|buck|stag)\b", ["\U0001F98C"]), "santa": Trigger(r"\bsanta\b", ["\U0001F385"]), "snowflake": Trigger(r"\b(snow ?)?flake(?! ?8)\b", ["\u2744\uFE0F"]), From d4ae0cd912e3a8c5d01e1141c4ba79313d3b824f Mon Sep 17 00:00:00 2001 From: Bradley Reynolds Date: Tue, 30 Jan 2024 09:31:25 -0600 Subject: [PATCH 3/3] Only flag on Christmas trees https://regex101.com/r/o9LrH2/1 --- bot/exts/holidays/holidayreact.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/holidays/holidayreact.py b/bot/exts/holidays/holidayreact.py index 6cc41450ea..9564b318ea 100644 --- a/bot/exts/holidays/holidayreact.py +++ b/bot/exts/holidays/holidayreact.py @@ -61,7 +61,7 @@ class Holiday(NamedTuple): } ) Christmas = Holiday([Month.DECEMBER], { - "christmas tree": Trigger(r"\b((christ|x)mas| tree)\b", ["\U0001F384"]), + "christmas tree": Trigger(r"\b(christ|x)mas\s?(tree(s)?)?\b", ["\U0001F384"]), "reindeer": Trigger(r"\b(reindeer|caribou|buck|stag)\b", ["\U0001F98C"]), "santa": Trigger(r"\bsanta\b", ["\U0001F385"]), "snowflake": Trigger(r"\b(snow ?)?flake(?! ?8)\b", ["\u2744\uFE0F"]),