aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2021-12-12 15:24:23 +0000
committerGravatar GitHub <[email protected]>2021-12-12 15:24:23 +0000
commit108368e4475daa91cf3af1169a3d961b9879004e (patch)
tree6f2792decfe9a9aa07e27d74d2e3de9fa4b3c187
parentBump django from 3.1.13 to 3.1.14 (diff)
parentMerge pull request #632 from python-discord/use-new-message-view (diff)
Merge branch 'main' into dependabot/pip/django-3.1.14
-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()