@@ -79,20 +79,24 @@ class RoleTags:
7979 "subscription_listing_id" ,
8080 "_premium_subscriber" ,
8181 "_available_for_purchase" ,
82- "_guild_connections"
82+ "_guild_connections" ,
8383 )
8484
8585 def __init__ (self , data : RoleTagPayload ):
8686 self .bot_id : int | None = _get_as_snowflake (data , "bot_id" )
8787 self .integration_id : int | None = _get_as_snowflake (data , "integration_id" )
88- self .subscription_listing_id : int | None = _get_as_snowflake (data , "subscription_listing_id" )
88+ self .subscription_listing_id : int | None = _get_as_snowflake (
89+ data , "subscription_listing_id"
90+ )
8991 # NOTE: The API returns "null" for this if the following tags True, and doesn't return them at all if False.
9092 # However, "null" corresponds to None.
9193 # This is different from other fields where "null" means "not there".
9294 # So in this case, a value of None is the same as True.
9395 # Which means we would need a different sentinel.
9496 self ._premium_subscriber : Any | None = data .get ("premium_subscriber" , MISSING )
95- self ._available_for_purchase : Any | None = data .get ("available_for_purchase" , MISSING )
97+ self ._available_for_purchase : Any | None = data .get (
98+ "available_for_purchase" , MISSING
99+ )
96100 self ._guild_connections : Any | None = data .get ("guild_connections" , MISSING )
97101
98102 def is_bot_managed (self ) -> bool :
@@ -110,14 +114,14 @@ def is_integration(self) -> bool:
110114 def is_available_for_purchase (self ) -> bool :
111115 """Whether the role is available for purchase.
112116
113- .. versionadded:: 2.7
114- """
117+ .. versionadded:: 2.7
118+ """
115119 return self ._available_for_purchase is None
116120
117121 def is_guild_connections_role (self ) -> bool :
118122 """Whether the role is a guild connections role.
119123
120- .. versionadded:: 2.7
124+ .. versionadded:: 2.7
121125 """
122126 return self ._guild_connections is None
123127
@@ -346,7 +350,6 @@ def is_guild_connections_role(self) -> bool:
346350 """
347351 return self .tags is not None and self .tags .is_guild_connections_role ()
348352
349-
350353 @property
351354 def permissions (self ) -> Permissions :
352355 """Returns the role's permissions."""
0 commit comments