Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithSwastik committed Nov 6, 2021
1 parent fcee9ea commit 7e4ce97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions discord/commands/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def _parse_options(self, params) -> List[Option]:
if p_obj.default != inspect.Parameter.empty:
option.required = False

option.default = option.default or p_obj.default
option.default = option.default if option.default is not None else p_obj.default

if option.default == inspect.Parameter.empty:
option.default = None
Expand Down Expand Up @@ -932,9 +932,9 @@ async def _invoke(self, ctx: ApplicationContext) -> None:

if self.cog is not None:
await self.callback(self.cog, ctx, target)
else:
else:
await self.callback(ctx, target)

def copy(self):
"""Creates a copy of this command.
Expand Down

0 comments on commit 7e4ce97

Please sign in to comment.