From 877671523c18aad4bb5061a1a2379beb5c761e3c Mon Sep 17 00:00:00 2001 From: ToxicKidz <78174417+ToxicKidz@users.noreply.github.com> Date: Fri, 26 Mar 2021 14:54:07 -0400 Subject: Make repository accept either user/reponame or user reponame --- bot/exts/evergreen/githubinfo.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bot/exts/evergreen/githubinfo.py') diff --git a/bot/exts/evergreen/githubinfo.py b/bot/exts/evergreen/githubinfo.py index 1b64b0eb..c8a6b3f7 100644 --- a/bot/exts/evergreen/githubinfo.py +++ b/bot/exts/evergreen/githubinfo.py @@ -102,12 +102,17 @@ class GithubInfo(commands.Cog): await ctx.send(embed=embed) @github_group.command(name='repository', aliases=('repo',)) - async def github_repo_info(self, ctx: commands.Context, repo: str) -> None: - """Fetches a repositories' GitHub information. The repository should look like `user/reponame`.""" + async def github_repo_info(self, ctx: commands.Context, *repo: str) -> None: + """ + Fetches a repositories' GitHub information. + + The repository should look like `user/reponame` or `user reponame`. + """ + repo = '/'.join(repo) if repo.count('/') != 1: embed = discord.Embed( title=random.choice(NEGATIVE_REPLIES), - description="The repository should look like `user/reponame`.", + description="The repository should look like `user/reponame` or `user reponame`.", colour=Colours.soft_red ) -- cgit v1.2.3