Skip to content

Commit

Permalink
Fixing LOA display issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeyUsersREC authored Jan 6, 2024
1 parent 2b8a0d5 commit 31b5133
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions cogs/Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down

0 comments on commit 31b5133

Please sign in to comment.