Skip to content

Commit 02d1e34

Browse files
committed
Properly support @commands.check() decorator
1 parent 7bd94de commit 02d1e34

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

discord_slash/model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def __init__(self, name, cmd): # Let's reuse old command formatting.
3434
# Since this isn't inherited from `discord.ext.commands.Command`, discord.py's check decorator will
3535
# add checks at this var.
3636
self.__commands_checks__ = []
37+
if hasattr(self.func, '__commands_checks__'):
38+
self.__commands_checks__ = self.func.__commands_checks__
3739

3840
async def invoke(self, *args, **kwargs):
3941
"""

0 commit comments

Comments
 (0)