aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2021-02-27 11:07:47 +0100
committerGravatar Numerlor <[email protected]>2021-02-27 11:07:47 +0100
commita95cbc501a813b18d4e11bacefef0d447578e6fe (patch)
tree4ab19f0039254b9f90ae259f49117549dbbcb2b8
parentGet the last index instead of using max (diff)
Add digits to package covnerter
-rw-r--r--bot/converters.py4
1 files 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