mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 15:48:29 +02:00
Add percentage to Message counter & leaderboard
This commit is contained in:
parent
f25bb468b4
commit
6a946559e2
3 changed files with 18 additions and 4 deletions
|
|
@ -107,6 +107,12 @@ def gainXp(user, user_db):
|
|||
update(user, "last_message", round(time.time()))
|
||||
|
||||
|
||||
def getTotalMessageCount():
|
||||
r = getAllRows()
|
||||
|
||||
return sum(user[11] for user in r)
|
||||
|
||||
|
||||
def getOrAddChannel(channelid: int):
|
||||
connection = utils.connect()
|
||||
cursor = connection.cursor()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue