From 31b5133fc216fbf8f91a695e976acbe105f29f2a Mon Sep 17 00:00:00 2001 From: i_iMikey <67828573+MikeyUsersREC@users.noreply.github.com> Date: Sat, 6 Jan 2024 19:24:34 +0000 Subject: [PATCH] Fixing LOA display issue --- cogs/Configuration.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cogs/Configuration.py b/cogs/Configuration.py index 875c1970..f0301bf6 100644 --- a/cogs/Configuration.py +++ b/cogs/Configuration.py @@ -513,6 +513,15 @@ async def _config(self, ctx: commands.Context): ) ]) + + loa_config = settings['staff_management'].get('loa_role') + if isinstance(ra_config, list): + loa_roles = [discord.utils.get(ctx.guild.roles, id=i) for i in loa_config] + elif isinstance(ra_config, int): + loa_roles = [discord.utils.get(ctx.guild.roles, id=loa_config)] + else: + loa_roles = [0] + loa_configuration_view = LOAConfiguration(bot, ctx.author.id, [ ( 'LOA Requests', @@ -527,9 +536,7 @@ async def _config(self, ctx: commands.Context): ), ( 'LOA Role', - [ - discord.utils.get(ctx.guild.roles, id=role) if ( role := settings['staff_management'].get('loa_role')) else 0 - ] + loa_roles ), ( 'LOA Channel',