Skip to content

Commit

Permalink
fix(ext.commands): Fixed required=False when default is None
Browse files Browse the repository at this point in the history
  • Loading branch information
solaluset committed Dec 9, 2023
1 parent d5355c4 commit 64d1c04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/ext/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ async def dispatch_error(self, ctx: Context, error: Exception) -> None:
async def transform(self, ctx: Context, param: inspect.Parameter) -> Any:
if isinstance(param.annotation, Option):
default = param.annotation.default
required = param.annotation.required or default is None
required = param.annotation.required and default is None
else:
default = param.default
required = default is param.empty
Expand Down

0 comments on commit 64d1c04

Please sign in to comment.