Closes #60, shows date/time on warnings. Potential bug: Embed field too large

This commit is contained in:
Zeva Rose 2021-07-20 18:47:35 -06:00
parent 877eff30f5
commit f32ab6957c

View file

@ -873,14 +873,14 @@ class AdminCog(commands.Cog):
) )
active = ( active = (
[ [
y["reason"] f'[{y["time"].strftime("%Y-%m-%d %H:%M:%S")}] {y["reason"]}'
for y in list(filter(lambda x: x["active"], warnings)) for y in list(filter(lambda x: x["active"], warnings))
] ]
if warnings if warnings
else ["None"] else ["None"]
) )
total = len(warnings) total = len(active) if warnings else 0
fields = [ fields = [
Field(f"{len(active)} Active", "\n".join(active)), Field(f"{len(active)} Active", "\n".join(active)),
Field("Total", total), Field("Total", total),