Skip to content

Commit

Permalink
Use is not None to check converter
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorukyum authored Oct 13, 2021
1 parent 9d148fd commit fc43b56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/commands/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ async def _invoke(self, ctx: ApplicationContext) -> None:
if arg is None:
arg = ctx.guild.get_role(arg_id) or arg_id

elif op.input_type == SlashCommandOptionType.string and hasattr(op._converter, "convert"):
elif op.input_type == SlashCommandOptionType.string and op._converter is not None:
arg = await op._converter.convert(ctx, arg)

kwargs[op.name] = arg
Expand Down

0 comments on commit fc43b56

Please sign in to comment.