Sort action items when logging in ModcaseCog
This commit is contained in:
parent
531239db12
commit
4965579897
1 changed files with 3 additions and 1 deletions
|
@ -43,7 +43,9 @@ class ModcaseCog(Cog):
|
||||||
self.logger.warning("Unsupported action %s, exiting", name)
|
self.logger.warning("Unsupported action %s, exiting", name)
|
||||||
return
|
return
|
||||||
|
|
||||||
action = await coll.find_one(q(user=user.id, guild=ctx.guild_id, active=True))
|
action = await coll.find_one(
|
||||||
|
q(user=user.id, guild=ctx.guild_id, active=True), sort=[("_id", -1)]
|
||||||
|
)
|
||||||
if not action:
|
if not action:
|
||||||
self.logger.warning("Missing action %s, exiting", name)
|
self.logger.warning("Missing action %s, exiting", name)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue