From a95cbc501a813b18d4e11bacefef0d447578e6fe Mon Sep 17 00:00:00 2001 From: Numerlor <25886452+Numerlor@users.noreply.github.com> Date: Sat, 27 Feb 2021 11:07:47 +0100 Subject: Add digits to package covnerter --- bot/converters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/converters.py b/bot/converters.py index 2b383636c..be1f1329f 100644 --- a/bot/converters.py +++ b/bot/converters.py @@ -134,13 +134,13 @@ class PackageName(Converter): Package names are used for stats and are restricted to the a-z and _ characters. """ - PACKAGE_NAME_RE = re.compile(r"[^a-z_]") + PACKAGE_NAME_RE = re.compile(r"[^a-z0-9_]") @classmethod async def convert(cls, ctx: Context, argument: str) -> str: """Checks whether the given string is a valid package name.""" if cls.PACKAGE_NAME_RE.search(argument): - raise BadArgument("The provided package name is not valid; please only use the _ and a-z characters.") + raise BadArgument("The provided package name is not valid; please only use the _, 0-9 and a-z characters.") return argument -- cgit v1.2.3