diff options
| author | 2021-08-11 23:34:19 +0100 | |
|---|---|---|
| committer | 2021-08-22 20:03:35 +0100 | |
| commit | 4e6af7be36da47cdd083ef27e4757f809b09aafd (patch) | |
| tree | aa561298652f49e550a7575987ac3026a13b6ae2 | |
| parent | Fix isinstance check (diff) | |
Remove redundant function
| -rw-r--r-- | bot/converters.py | 13 |
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. |