We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9801d5c commit 5ac16bbCopy full SHA for 5ac16bb
discord/role.py
@@ -121,6 +121,8 @@ class RoleType(IntEnum):
121
122
Attributes
123
----------
124
+ NORMAL: :class:`int`
125
+ The role is a normal role.
126
APPLICATION: :class:`int`
127
The role is an application (bot) role.
128
BOOSTER: :class:`int`
@@ -141,6 +143,7 @@ class RoleType(IntEnum):
141
143
The role type is unknown.
142
144
"""
145
146
+ NORMAL = 0
147
APPLICATION = 1
148
BOOSTER = 2
149
GUILD_PRODUCT = 3
@@ -561,7 +564,7 @@ def type(self) -> RoleType:
561
564
562
565
.. versionadded:: 2.7
563
566
- return self.tags.type
567
+ return self.tags.type if self.tags is not None else RoleType.NORMAL
568
569
async def _move(self, position: int, reason: str | None) -> None:
570
if position <= 0:
0 commit comments