feat(moderation): you are now able to check moderation history of moderators
All checks were successful
Pylint / Pylint (push) Successful in 1m13s
All checks were successful
Pylint / Pylint (push) Successful in 1m13s
This commit is contained in:
parent
fc5ee4dcc0
commit
4a628cfc1d
1 changed files with 16 additions and 3 deletions
|
@ -452,10 +452,23 @@ class Moderation(commands.Cog):
|
|||
cursor = database.cursor()
|
||||
if target:
|
||||
query = """SELECT *
|
||||
FROM moderation_%s
|
||||
WHERE target_id = %s
|
||||
ORDER BY moderation_id DESC;"""
|
||||
FROM moderation_%s
|
||||
WHERE target_id = %s
|
||||
ORDER BY moderation_id DESC;"""
|
||||
cursor.execute(query, (interaction.guild.id, target.id))
|
||||
elif moderator:
|
||||
query = """SELECT *
|
||||
FROM moderation_%s
|
||||
WHERE moderator_id = %s
|
||||
ORDER BY moderation_id DESC;"""
|
||||
cursor.execute(query, (interaction.guild.id, moderator.id))
|
||||
elif channel:
|
||||
query = """SELECT *
|
||||
FROM moderation_%s
|
||||
WHERE target_id = %s
|
||||
ORDER BY moderation_id DESC;"""
|
||||
cursor.execute(query, (interaction.guild.id, channel.id))
|
||||
if target or moderator:
|
||||
results = cursor.fetchall()
|
||||
result_dict_list = []
|
||||
for result in results:
|
||||
|
|
Loading…
Reference in a new issue