fix(moderation): moderations are now sorted in descending order by ID in history command
Some checks failed
Pylint / Pylint (push) Failing after 1m14s
Some checks failed
Pylint / Pylint (push) Failing after 1m14s
This commit is contained in:
parent
45a1edf0d0
commit
0c006432d8
1 changed files with 4 additions and 1 deletions
|
@ -451,7 +451,10 @@ class Moderation(commands.Cog):
|
||||||
database = await self.connect()
|
database = await self.connect()
|
||||||
cursor = database.cursor()
|
cursor = database.cursor()
|
||||||
if target:
|
if target:
|
||||||
query = "SELECT * FROM moderation_%s WHERE target_id = %s"
|
query = """SELECT *
|
||||||
|
FROM moderation_%s
|
||||||
|
WHERE target_id = %s
|
||||||
|
ORDER BY moderation_id DESC;"""
|
||||||
cursor.execute(query, (interaction.guild.id, target.id))
|
cursor.execute(query, (interaction.guild.id, target.id))
|
||||||
results = cursor.fetchall()
|
results = cursor.fetchall()
|
||||||
result_dict_list = []
|
result_dict_list = []
|
||||||
|
|
Loading…
Reference in a new issue