Skip to content

Commit

Permalink
Fix custom option converter not being initialized for slash commands (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lzgirlcat committed May 15, 2023
1 parent 6baffd2 commit f9eae87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightbulb/context/slash.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def _convert_option(self, name: str, value: str) -> None:
if opt_type in CONVERTER_TYPE_MAPPING:
self._options[name] = await CONVERTER_TYPE_MAPPING[cmd.options[name].arg_type](self).convert(value)
elif inspect.isclass(opt_type) and issubclass(cmd.options[name].arg_type, BaseConverter):
self._options[name] = await opt_type.convert(value)
self._options[name] = await opt_type(self).convert(value)
elif callable(opt_type):
temp: t.Any = opt_type(value)
if inspect.iscoroutine(temp):
Expand Down

0 comments on commit f9eae87

Please sign in to comment.