fix(moderation): history will no longer show case 0
All checks were successful
Pylint / Pylint (push) Successful in 1m13s

This commit is contained in:
Seaswimmer 2023-10-06 23:48:47 -04:00
parent 5451f31c9f
commit bde82ae975
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -565,6 +565,8 @@ class Moderation(commands.Cog):
embed.set_author(icon_url=interaction.guild.icon.url, name='Infraction History') embed.set_author(icon_url=interaction.guild.icon.url, name='Infraction History')
embed.set_footer(text=f"Page {page}/{page_quantity} | {case_quantity} Results") embed.set_footer(text=f"Page {page}/{page_quantity} | {case_quantity} Results")
for case in result_dict_list[start_index:end_index]: for case in result_dict_list[start_index:end_index]:
if str(case['moderation_id']) == '0':
continue
target_user = await self.fetch_user_dict(interaction, case['target_id']) target_user = await self.fetch_user_dict(interaction, case['target_id'])
moderator_user = await self.fetch_user_dict(interaction, case['moderator_id']) moderator_user = await self.fetch_user_dict(interaction, case['moderator_id'])
target_name = f"`{target_user['name']}`" if target_user['discriminator'] == "0" else f"`{target_user['name']}#{target_user['discriminator']}`" target_name = f"`{target_user['name']}`" if target_user['discriminator'] == "0" else f"`{target_user['name']}#{target_user['discriminator']}`"