diff options
author | 2019-10-01 21:44:50 -0700 | |
---|---|---|
committer | 2019-10-01 21:44:50 -0700 | |
commit | 1cce13ba9928a0c6b78840f62fc0b7fba83e5852 (patch) | |
tree | 6a797529f2098b45f1dd438c6633365bcbb3e88d | |
parent | Merge pull request #475 from python-discord/fix-tags-edit-command (diff) | |
parent | Merge branch 'master' into short-docs (diff) |
Merge pull request #467 from Ayplow/short-docs
Forward arguments to !docs get
-rw-r--r-- | bot/cogs/doc.py | 8 | ||||
-rw-r--r-- | bot/converters.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bot/cogs/doc.py b/bot/cogs/doc.py index e5c51748f..c9e6b3b91 100644 --- a/bot/cogs/doc.py +++ b/bot/cogs/doc.py @@ -261,7 +261,7 @@ class Doc(commands.Cog): @commands.group(name='docs', aliases=('doc', 'd'), invoke_without_command=True) async def docs_group(self, ctx: commands.Context, symbol: commands.clean_content = None) -> None: """Lookup documentation for Python symbols.""" - await ctx.invoke(self.get_command) + await ctx.invoke(self.get_command, symbol) @docs_group.command(name='get', aliases=('g',)) async def get_command(self, ctx: commands.Context, symbol: commands.clean_content = None) -> None: @@ -319,9 +319,9 @@ class Doc(commands.Cog): Example: !docs set \ - discord \ - https://discordpy.readthedocs.io/en/rewrite/ \ - https://discordpy.readthedocs.io/en/rewrite/objects.inv + python \ + https://docs.python.org/3/ \ + https://docs.python.org/3/objects.inv """ body = { 'package': package_name, diff --git a/bot/converters.py b/bot/converters.py index 339da7b60..6d6453486 100644 --- a/bot/converters.py +++ b/bot/converters.py @@ -49,7 +49,7 @@ class ValidURL(Converter): async with ctx.bot.http_session.get(url) as resp: if resp.status != 200: raise BadArgument( - f"HTTP GET on `{url}` returned status `{resp.status_code}`, expected 200" + f"HTTP GET on `{url}` returned status `{resp.status}`, expected 200" ) except CertificateError: if url.startswith('https'): |