Skip to content

Commit 2447303

Browse files
committed
Update converter.py
1 parent 8619b69 commit 2447303

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

discord/ext/commands/converter.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,9 @@ async def convert(self, ctx: Context, argument: str) -> discord.PartialEmoji:
872872
id=emoji_id,
873873
)
874874

875+
if argument:
876+
return discord.PartialEmoji(name=argument)
877+
875878
raise PartialEmojiConversionFailure(argument)
876879

877880

@@ -1094,7 +1097,11 @@ def get_converter(param: inspect.Parameter) -> Any:
10941097

10951098

10961099
def is_generic_type(tp: Any, *, _GenericAlias: type = _GenericAlias) -> bool:
1097-
return isinstance(tp, type) and issubclass(tp, Generic) or isinstance(tp, _GenericAlias) # type: ignore
1100+
return (
1101+
isinstance(tp, type)
1102+
and issubclass(tp, Generic)
1103+
or isinstance(tp, _GenericAlias)
1104+
) # type: ignore
10981105

10991106

11001107
CONVERTER_MAPPING: dict[type[Any], Any] = {

0 commit comments

Comments
 (0)