feat(bot): ✨ Add "Ongoing Bans" stat to p.stats and reduce default iterations to 4.
This commit is contained in:
@@ -329,7 +329,7 @@ class Mods(base.Cog):
|
||||
@commands.command()
|
||||
@commands.is_owner()
|
||||
async def stats(
|
||||
self, ctx: commands.Context, iterations: int = 5, wait: int = 5
|
||||
self, ctx: commands.Context, iterations: int = 4, wait: int = 5
|
||||
) -> None:
|
||||
"""
|
||||
Shows all Payphone's stats.
|
||||
@@ -362,6 +362,16 @@ class Mods(base.Cog):
|
||||
lambda: models.Call.filter(ended_at=None).count(),
|
||||
),
|
||||
("Bans", lambda: models.Ban.all().count()),
|
||||
(
|
||||
"Ongoing Bans",
|
||||
lambda: models.Ban.filter(
|
||||
expressions.Q(
|
||||
expires_at=None,
|
||||
expires_at__gt=datetime.now(timezone.utc),
|
||||
join_type="OR",
|
||||
)
|
||||
).count(),
|
||||
),
|
||||
("Reports", lambda: models.Report.all().count()),
|
||||
(
|
||||
"On-review Reports",
|
||||
|
||||
Reference in New Issue
Block a user