Add Option converter, fix default optional, fix help command

This commit is contained in:
Gnome
2021-08-31 18:44:32 +01:00
parent 1a22df6228
commit 7c83c335d1
4 changed files with 45 additions and 11 deletions

View File

@@ -1105,7 +1105,7 @@ class BotBase(GroupMixin):
option = next((o for o in command_options if o['name'] == name), None) # type: ignore
if option is None:
if not command._is_typing_optional(param.annotation):
if param.default is param.empty and not command._is_typing_optional(param.annotation):
raise errors.MissingRequiredArgument(param)
elif (
option["type"] == 3