Skip to content

Commit 40c234c

Browse files
sairam4123khazhyk
authored andcommitted
[commands] handle CustomDefault in Greedy converter
[khazhyk: removed list handling, adjusted message]
1 parent 1fe24c9 commit 40c234c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/ext/commands/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ async def _transform_greedy_pos(self, ctx, param, required, converter):
710710
result.append(value)
711711

712712
if not result and not required:
713-
return param.default
713+
return await self._resolve_default(ctx, param)
714714
return result
715715

716716
async def _transform_greedy_var_pos(self, ctx, param, converter):
@@ -723,7 +723,7 @@ async def _transform_greedy_var_pos(self, ctx, param, converter):
723723
view.index = previous
724724
raise RuntimeError() from None # break loop
725725
else:
726-
return value
726+
return value or await self._resolve_default(ctx, param)
727727

728728
@property
729729
def clean_params(self) -> Dict[str, inspect.Parameter]:

0 commit comments

Comments
 (0)