From d6a4358c31e3d82fb4a2dea1bd16cc2a02e33e7c Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Mon, 13 May 2019 22:13:46 +0100 Subject: [PATCH] Allow anyone to list managed roles. --- plugin/role/role.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/role/role.py b/plugin/role/role.py index ab4bfb1..aa8ebec 100644 --- a/plugin/role/role.py +++ b/plugin/role/role.py @@ -115,6 +115,8 @@ class Role(DBConnection): await cat.yelp(message.channel) async def can_manage_roles(self, author, channel, command, server = None, hiss = True): + if command == 'list': + log.debug('Anyone can list managed roles.') if command in ['manage', 'unmanage']: if bot.is_admin(author, server): return True @@ -201,7 +203,7 @@ class Role(DBConnection): hiss = False for managed_role in self.get_managed_roles(): server = client.get_server(managed_role.server_id) - result = await self.can_manage_roles(message.author, message.channel, 'manage', server, False) + result = await self.can_manage_roles(message.author, message.channel, 'list', server, False) if not result: hiss = True continue -- 2.7.4