aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2020-07-14 00:18:58 +0200
committerGravatar Numerlor <[email protected]>2020-07-14 00:18:58 +0200
commitea0dcabbca10c5fe2afcee2b9451e1494bc069a2 (patch)
tree4d1c35bad67cf94dd801b222213b930868154a12
parentAdd doc suffix to doc commands. (diff)
Make the symbol parameter optional.
The commands were changed to be greedy, this however made them required arguments breaking the access to the default listing of the available inventories
-rw-r--r--bot/cogs/doc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/doc.py b/bot/cogs/doc.py
index 7f1fb6135..66c4b4ea8 100644
--- a/bot/cogs/doc.py
+++ b/bot/cogs/doc.py
@@ -430,12 +430,12 @@ class Doc(commands.Cog):
return soup
@commands.group(name='docs', aliases=('doc', 'd'), invoke_without_command=True)
- async def docs_group(self, ctx: commands.Context, *, symbol: str) -> None:
+ async def docs_group(self, ctx: commands.Context, *, symbol: Optional[str]) -> None:
"""Lookup documentation for Python symbols."""
await ctx.invoke(self.get_command, symbol=symbol)
@docs_group.command(name='getdoc', aliases=('g',))
- async def get_command(self, ctx: commands.Context, *, symbol: str) -> None:
+ async def get_command(self, ctx: commands.Context, *, symbol: Optional[str]) -> None:
"""
Return a documentation embed for a given symbol.