mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[V3] Disregard limitations on repo names (#1349)
This commit is contained in:
parent
09ddfe4250
commit
1363bc3f43
@ -4,11 +4,6 @@ from .repo_manager import RepoManager
|
||||
from .installable import Installable
|
||||
|
||||
|
||||
class RepoName(commands.Converter):
|
||||
async def convert(self, ctx: commands.Context, arg: str) -> str:
|
||||
return RepoManager.validate_and_normalize_repo_name(arg)
|
||||
|
||||
|
||||
class InstalledCog(commands.Converter):
|
||||
async def convert(self, ctx: commands.Context, arg: str) -> Installable:
|
||||
downloader = ctx.bot.get_cog("Downloader")
|
||||
|
||||
@ -14,7 +14,7 @@ from discord.ext import commands
|
||||
|
||||
from redbot.core.bot import Red
|
||||
from .checks import install_agreement
|
||||
from .converters import RepoName, InstalledCog
|
||||
from .converters import InstalledCog
|
||||
from .errors import CloningError, ExistingGitRepo
|
||||
from .installable import Installable
|
||||
from .log import log
|
||||
@ -197,7 +197,7 @@ class Downloader:
|
||||
|
||||
@repo.command(name="add")
|
||||
@install_agreement()
|
||||
async def _repo_add(self, ctx, name: RepoName, repo_url: str, branch: str=None):
|
||||
async def _repo_add(self, ctx, name: str, repo_url: str, branch: str=None):
|
||||
"""
|
||||
Add a new repo to Downloader.
|
||||
|
||||
|
||||
@ -554,7 +554,6 @@ class RepoManager:
|
||||
New Repo object representing the cloned repository.
|
||||
|
||||
"""
|
||||
name = self.validate_and_normalize_repo_name(name)
|
||||
if self.does_repo_exist(name):
|
||||
raise InvalidRepoName(
|
||||
"That repo name you provided already exists."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user