Skip to content

Commit

Permalink
Update menus.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeyUsersREC authored Dec 7, 2024
1 parent 76843d2 commit a40a8c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -9791,11 +9791,13 @@ async def change_type(self, interaction: discord.Interaction, button: discord.ui

punishment_types = (await self.bot.punishment_types.get_punishment_types(interaction.guild.id)) or {'types': []}
chosen_identifier = None
for item in punishment_types['types']:
for item in punishment_types['types'] + ["Warning", "Kick", "Ban", "BOLO"]:
if isinstance(item, str) and item.lower() == chosen_type.lower():
chosen_identifier = item
break
elif isinstance(item, dict) and item['name'].lower() == chosen_type.lower():
chosen_identifier = item['name']
break


if not chosen_identifier:
Expand Down

0 comments on commit a40a8c9

Please sign in to comment.