aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Izan <[email protected]>2021-08-11 23:34:19 +0100
committerGravatar Izan <[email protected]>2021-08-22 20:03:35 +0100
commit4e6af7be36da47cdd083ef27e4757f809b09aafd (patch)
treeaa561298652f49e550a7575987ac3026a13b6ae2
parentFix isinstance check (diff)
Remove redundant function
-rw-r--r--bot/converters.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/bot/converters.py b/bot/converters.py
index ff9f6e5d9..37eb91c7f 100644
--- a/bot/converters.py
+++ b/bot/converters.py
@@ -456,19 +456,6 @@ class UserMentionOrID(UserConverter):
raise BadArgument(f"`{argument}` is not a User mention or a User ID.")
-def _snowflake_from_regex(pattern: t.Pattern, arg: str) -> int:
- """
- Extract the snowflake from `arg` using a regex `pattern` and return it as an int.
-
- The snowflake is expected to be within the first capture group in `pattern`.
- """
- match = pattern.match(arg)
- if not match:
- raise BadArgument(f"Mention {str!r} is invalid.")
-
- return int(match.group(1))
-
-
class Infraction(Converter):
"""
Attempts to convert a given infraction ID into an infraction.