mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Allow dots in the middle of repo names (#5214)
* Allow dots in the middle of repo names * Screw you, Black
This commit is contained in:
parent
8eac787f7b
commit
f6cf0d5670
@ -540,9 +540,15 @@ class Downloader(commands.Cog):
|
|||||||
agreed = await do_install_agreement(ctx)
|
agreed = await do_install_agreement(ctx)
|
||||||
if not agreed:
|
if not agreed:
|
||||||
return
|
return
|
||||||
if re.match(r"^[a-zA-Z0-9_\-]*$", name) is None:
|
if name.startswith(".") or name.endswith("."):
|
||||||
|
await ctx.send(_("Repo names cannot start or end with a dot."))
|
||||||
|
return
|
||||||
|
if re.match(r"^[a-zA-Z0-9_\-\.]+$", name) is None:
|
||||||
await ctx.send(
|
await ctx.send(
|
||||||
_("Repo names can only contain characters A-z, numbers, underscores, and hyphens.")
|
_(
|
||||||
|
"Repo names can only contain characters A-z, numbers, underscores, hyphens,"
|
||||||
|
" and dots."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user