Skip to content

Commit 9d20db2

Browse files
authored
added docstring for the is_owner decorator
1 parent 94de0be commit 9d20db2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

discord/commands/permissions.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,19 @@ def decorator(func: Callable):
199199
return decorator
200200

201201
def is_owner(guild_id: int = None):
202+
"""The method used to limit application commands exclusively
203+
to the owner of the bot.
204+
205+
This method is meant to be used as a decorator.
206+
207+
.. versionadded:: 2.0
208+
209+
Attributes
210+
-----------
211+
guild_id: :class:`int`
212+
The integer which represents the id of the guild that the
213+
permission may be tied to.
214+
"""
202215
def decorator(func: Callable):
203216
# Create __app_cmd_perms__
204217
if not hasattr(func, '__app_cmd_perms__'):

0 commit comments

Comments
 (0)