feat(moderation): enabled checking history without a user/target or moderator set

This commit is contained in:
Seaswimmer 2023-10-06 22:55:07 -04:00
parent 9d10e8a635
commit 3c35eeb29d
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -465,6 +465,11 @@ class Moderation(commands.Cog):
WHERE moderator_id = %s
ORDER BY moderation_id DESC;"""
cursor.execute(query, (interaction.guild.id, moderator.id))
else:
query = """SELECT *
FROM moderation_%s
ORDER BY moderation_id DESC;"""
cursor.execute(query, (interaction.guild.id))
results = cursor.fetchall()
result_dict_list = []
for result in results: