aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2021-12-11 20:25:50 +0100
committerGravatar GitHub <[email protected]>2021-12-11 20:25:50 +0100
commitd6f82da9c9011c0584ed35701cb827ef34b459e8 (patch)
treee2f930f42ac2ed36d2d5e2255a3e80c9cf4af754
parentMerge pull request #630 from python-discord/dependabot/pip/django-3.1.13 (diff)
parentMerge branch 'main' into use-new-message-view (diff)
Merge pull request #632 from python-discord/use-new-message-view
Use new approx message count view
-rw-r--r--pydis_site/apps/api/models/bot/metricity.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/pydis_site/apps/api/models/bot/metricity.py b/pydis_site/apps/api/models/bot/metricity.py
index 901f191a..52e946ac 100644
--- a/pydis_site/apps/api/models/bot/metricity.py
+++ b/pydis_site/apps/api/models/bot/metricity.py
@@ -46,14 +46,12 @@ class Metricity:
self.cursor.execute(
"""
SELECT
- COUNT(*)
- FROM messages
+ message_count
+ FROM user_has_approx_message_count
WHERE
author_id = '%s'
- AND NOT is_deleted
- AND channel_id NOT IN %s
""",
- [user_id, EXCLUDE_CHANNELS]
+ [user_id]
)
values = self.cursor.fetchone()