File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,21 @@ def decorator(func: Callable):
105
105
return decorator
106
106
107
107
def has_role (item : Union [int , str ], guild_id : int = None ):
108
+ """The method used to specify application command role restrictions.
109
+
110
+ This method is meant to be used as a decorator.
111
+
112
+ .. versionadded:: 2.0
113
+
114
+ Attributes
115
+ -----------
116
+ item: Union[:class:`int`, :class:`str`]
117
+ An integer or string that represent the id or name of the role
118
+ that the permission is tied to.
119
+ guild_id: :class:`int`
120
+ The integer which represents the id of the guild that the
121
+ permission may be tied to.
122
+ """
108
123
def decorator (func : Callable ):
109
124
# Create __app_cmd_perms__
110
125
if not hasattr (func , '__app_cmd_perms__' ):
You can’t perform that action at this time.
0 commit comments