Make command usage in help for required arguments consistent (#4589)

* Make command usage in help for required arguments consistent

* Bob 3

* Bob 1

* Docstring updates

* Address Flame's review

* Update cog guides in docs
This commit is contained in:
jack1142
2020-12-22 20:14:47 +01:00
committed by GitHub
parent 59e1e31634
commit b36a702e62
9 changed files with 109 additions and 214 deletions

View File

@@ -279,7 +279,7 @@ class Trivia(commands.Cog):
else:
await ctx.send(_("Trivia file was not found."))
@commands.group(invoke_without_command=True)
@commands.group(invoke_without_command=True, require_var_positional=True)
@commands.guild_only()
async def trivia(self, ctx: commands.Context, *categories: str):
"""Start trivia session on the specified category.
@@ -287,9 +287,6 @@ class Trivia(commands.Cog):
You may list multiple categories, in which case the trivia will involve
questions from all of them.
"""
if not categories:
await ctx.send_help()
return
categories = [c.lower() for c in categories]
session = self._get_trivia_session(ctx.channel)
if session is not None: