Skip to content

Commit d6f82da

Browse files
authored
Merge pull request #632 from python-discord/use-new-message-view
Use new approx message count view
2 parents 63c6c45 + 6b8cce5 commit d6f82da

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

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

0 commit comments

Comments
 (0)