Remove potential Attribute error from __origin__
@@ -484,9 +484,9 @@ class SlashCommandOptionType(IntEnum):
return cls.ROLE
if hasattr(typing, "_GenericAlias"): # 3.7 onwards
# Easier than imports
- if (
- t.__origin__ is not None and t.__origin__ is typing.Union
- ): # proven in 3.7.8+, 3.8.6+, 3.9+ definitively
+ if hasattr(t, "__origin__"):
+ if t.__origin__ is typing.Union:
+ # proven in 3.7.8+, 3.8.6+, 3.9+ definitively
return cls.MENTIONABLE
if not hasattr(typing, "_GenericAlias"): # py 3.6
if isinstance(t, typing._Union): # noqa
