mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 08:40:11 +00:00
Add message count to member card. Closes #12
This commit is contained in:
parent
f067485e88
commit
16173e428b
3 changed files with 11 additions and 5 deletions
|
|
@ -259,6 +259,10 @@ async def delete_message(conn, message_id: str):
|
|||
logger.debug("Deleting message (id={})".format(message_id))
|
||||
await conn.execute("delete from messages where mid = $1", int(message_id))
|
||||
|
||||
@db_wrap
|
||||
async def get_member_message_count(conn, member_id: int) -> int:
|
||||
return await conn.fetchval("select count(*) from messages where member = $1", member_id)
|
||||
|
||||
@db_wrap
|
||||
async def front_history(conn, system_id: int, count: int):
|
||||
return await conn.fetch("""select
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue