Skip to content

Commit 2716945

Browse files
authored
Merge pull request #635 from python-discord/revert-metricity-change
2 parents b814ec8 + f65184b commit 2716945

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pydis_site/apps/api/models/bot/metricity.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ def total_messages(self, user_id: str) -> int:
4646
self.cursor.execute(
4747
"""
4848
SELECT
49-
message_count
50-
FROM user_has_approx_message_count
49+
COUNT(*)
50+
FROM messages
5151
WHERE
5252
author_id = '%s'
53+
AND NOT is_deleted
54+
AND channel_id NOT IN %s
5355
""",
54-
[user_id]
56+
[user_id, EXCLUDE_CHANNELS]
5557
)
5658
values = self.cursor.fetchone()
5759

0 commit comments

Comments
 (0)