Skip to content

Commit

Permalink
🩹 Fix Role.is_integration()
Browse files Browse the repository at this point in the history
  • Loading branch information
Paillat-dev committed Oct 11, 2024
1 parent 9a83a2a commit 694a5c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions discord/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ class Role(Hashable):
operators on the role objects themselves.
managed: :class:`bool`
Indicates if the role is managed by the guild through some form of
integrations such as Twitch.
Indicates if the role is managed by an integration.
mentionable: :class:`bool`
Indicates if the role can be mentioned by users.
tags: Optional[:class:`RoleTags`]
Expand Down Expand Up @@ -287,11 +286,11 @@ def is_premium_subscriber(self) -> bool:
return self.tags is not None and self.tags.is_premium_subscriber()

def is_integration(self) -> bool:
"""Whether the role is managed by an integration.
"""Whether the role is managed by an integration. Shorthand for :attr:`Role.managed`.
.. versionadded:: 1.6
"""
return self.tags is not None and self.tags.is_integration()
return self.managed

def is_assignable(self) -> bool:
"""Whether the role is able to be assigned or removed by the bot.
Expand Down

0 comments on commit 694a5c0

Please sign in to comment.