По какой-то причине это не позволяет мне сделать команду, в которой определенные пользователи с определенной ролью, называемой "DJ", получают доступ к команде.Я попробовал все, но все еще не работает.
@commands.command(pass_context=True, no_pm=True)
async def leave(self, ctx):
if ctx.message.author.roles == 'DJ':
try:
server = ctx.message.server
voice_client = self.client.voice_client_in(server)
await voice_client.disconnect()
except Exception as error:
await self.client.say('{}'.format(error))
else:
await self.client.say('You require the role `DJ` to use this command.')