From 64d1c04660101e7c70eb7aacb4ade17a91775f62 Mon Sep 17 00:00:00 2001 From: Krutyi 4el <60041069+Krutyi-4el@users.noreply.github.com> Date: Sat, 9 Dec 2023 18:47:10 +0200 Subject: [PATCH] fix(ext.commands): Fixed required=False when default is None --- discord/ext/commands/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 4adb27cad0..24d7d86d87 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -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