aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-01-09 16:10:56 +0000
committerGravatar Chris Lovering <[email protected]>2022-01-09 17:34:07 +0000
commit3ff21f1afe37e28b6a185e817691564df7e25821 (patch)
treee27a0629af86b24d764c185dbcdbcfe71626b5f5
parentuse regex from bot-core for discord invites (diff)
Move single-use message ID regex to inside file that uses it
This moves the regex closer to the place actually using the regex, and removes the need for a regex.py file entirely.
-rw-r--r--bot/monkey_patches.py3
-rw-r--r--bot/utils/regex.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/bot/monkey_patches.py b/bot/monkey_patches.py
index b5c0de8d9..4840fa454 100644
--- a/bot/monkey_patches.py
+++ b/bot/monkey_patches.py
@@ -1,3 +1,4 @@
+import re
from datetime import timedelta
import arrow
@@ -5,9 +6,9 @@ from discord import Forbidden, http
from discord.ext import commands
from bot.log import get_logger
-from bot.utils.regex import MESSAGE_ID_RE
log = get_logger(__name__)
+MESSAGE_ID_RE = re.compile(r'(?P<message_id>[0-9]{15,20})$')
class Command(commands.Command):
diff --git a/bot/utils/regex.py b/bot/utils/regex.py
deleted file mode 100644
index 205c3ae34..000000000
--- a/bot/utils/regex.py
+++ /dev/null
@@ -1,3 +0,0 @@
-import re
-
-MESSAGE_ID_RE = re.compile(r'(?P<message_id>[0-9]{15,20})$')