@@ -136,6 +136,22 @@ def decorator(func: Callable):
136
136
return decorator
137
137
138
138
def has_any_role (* items : Union [int , str ], guild_id : int = None ):
139
+ """The method used to specify multiple application command role restrictions,
140
+ The application command runs if the invoker has **any** of the specified roles.
141
+
142
+ This method is meant to be used as a decorator.
143
+
144
+ .. versionadded:: 2.0
145
+
146
+ Attributes
147
+ -----------
148
+ *items: Union[:class:`int`, :class:`str`]
149
+ The integers or strings that represent the ids or names of the roles
150
+ that the permission is tied to.
151
+ guild_id: :class:`int`
152
+ The integer which represents the id of the guild that the
153
+ permission may be tied to.
154
+ """
139
155
def decorator (func : Callable ):
140
156
# Create __app_cmd_perms__
141
157
if not hasattr (func , '__app_cmd_perms__' ):
@@ -153,6 +169,20 @@ def decorator(func: Callable):
153
169
return decorator
154
170
155
171
def is_user (user : int , guild_id : int = None ):
172
+ """The method used to specify application command user restrictions.
173
+
174
+ This method is meant to be used as a decorator.
175
+
176
+ .. versionadded:: 2.0
177
+
178
+ Attributes
179
+ -----------
180
+ user: :class:`int`
181
+ An integer that represent the id the user the permission is tied to.
182
+ guild_id: :class:`int`
183
+ The integer which represents the id of the guild that the
184
+ permission may be tied to.
185
+ """
156
186
def decorator (func : Callable ):
157
187
# Create __app_cmd_perms__
158
188
if not hasattr (func , '__app_cmd_perms__' ):
0 commit comments