From 505787fe94025dab23ecf0175009a0d81097f002 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Mon, 19 Jul 2021 13:03:45 -0600 Subject: [PATCH] Close #55 --- jarvis/cogs/admin.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/jarvis/cogs/admin.py b/jarvis/cogs/admin.py index 865ed65..4427638 100644 --- a/jarvis/cogs/admin.py +++ b/jarvis/cogs/admin.py @@ -865,9 +865,20 @@ class AdminCog(commands.Cog): } ) ) - active = len(list(filter(lambda x: x["active"], warnings))) + active = ( + [ + y["reason"] + for y in list(filter(lambda x: x["active"], warnings)) + ] + if warnings + else ["None"] + ) + total = len(warnings) - fields = [Field("Active", active), Field("Total", total)] + fields = [ + Field(f"{len(active)} Active", "\n".join(active)), + Field("Total", total), + ] embed = build_embed( title="Warnings", description=f"{user.mention} active and total warnings",