I have a command with a decorator @commands.has_role("admin")
and I need to get that role. This is what I have tried:
filtered = await self.filter_commands(self.context.bot.commands, sort=True)
checks = [command.checks for command in filtered]
for check in checks:
for c in check:
print(c.role)
but returns AttributeError: 'function' object has no attribute 'role'
.
How do I get the value of that decorator? This decorator is not custom, it is part of discord.py
(discord.ext.commands)