Fixed: Incidents now have a red border instead of green when reporting it.

Fixed: Made the Funny Moments a context command instead of slash command
Updated: Changed the status for now to be related to what's being worked on.
This commit is contained in:
Dan
2025-01-28 10:16:36 -05:00
parent c4962f2d09
commit 6f2b13f055
3 changed files with 133 additions and 82 deletions

View File

@ -119,3 +119,15 @@ class Database:
"details": dict(incident),
"messages": [dict(msg) for msg in messages]
}
def get_recent_incidents(self, moderator_id: int, limit: int = 25):
with self._get_connection() as conn:
conn.row_factory = sqlite3.Row
cursor = conn.cursor()
cursor.execute("""
SELECT id FROM incidents
WHERE moderator_id = ?
ORDER BY timestamp DESC
LIMIT ?
""", (moderator_id, limit))
return [dict(row) for row in cursor.fetchall()]