@@ -79,20 +79,24 @@ class RoleTags:
79
79
"subscription_listing_id" ,
80
80
"_premium_subscriber" ,
81
81
"_available_for_purchase" ,
82
- "_guild_connections"
82
+ "_guild_connections" ,
83
83
)
84
84
85
85
def __init__ (self , data : RoleTagPayload ):
86
86
self .bot_id : int | None = _get_as_snowflake (data , "bot_id" )
87
87
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
+ )
89
91
# NOTE: The API returns "null" for this if the following tags True, and doesn't return them at all if False.
90
92
# However, "null" corresponds to None.
91
93
# This is different from other fields where "null" means "not there".
92
94
# So in this case, a value of None is the same as True.
93
95
# Which means we would need a different sentinel.
94
96
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
+ )
96
100
self ._guild_connections : Any | None = data .get ("guild_connections" , MISSING )
97
101
98
102
def is_bot_managed (self ) -> bool :
@@ -110,14 +114,14 @@ def is_integration(self) -> bool:
110
114
def is_available_for_purchase (self ) -> bool :
111
115
"""Whether the role is available for purchase.
112
116
113
- .. versionadded:: 2.7
114
- """
117
+ .. versionadded:: 2.7
118
+ """
115
119
return self ._available_for_purchase is None
116
120
117
121
def is_guild_connections_role (self ) -> bool :
118
122
"""Whether the role is a guild connections role.
119
123
120
- .. versionadded:: 2.7
124
+ .. versionadded:: 2.7
121
125
"""
122
126
return self ._guild_connections is None
123
127
0 commit comments