diff options
author | 2021-12-28 15:23:36 +0000 | |
---|---|---|
committer | 2021-12-28 15:23:36 +0000 | |
commit | c4e2edab7b641a291e00973437730d01b2d71fb5 (patch) | |
tree | c7d7c51ed6ab9598ab9e00e7aca253bea1077588 /pydis_site/apps/api/models | |
parent | Merge migrations to avoid conflicts. (diff) | |
parent | Merge pull request #636 from python-discord/revert-metricity-change (diff) |
Merge branch 'main' into otn_softdel
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r-- | pydis_site/apps/api/models/bot/metricity.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pydis_site/apps/api/models/bot/metricity.py b/pydis_site/apps/api/models/bot/metricity.py index 52e946ac..901f191a 100644 --- a/pydis_site/apps/api/models/bot/metricity.py +++ b/pydis_site/apps/api/models/bot/metricity.py @@ -46,12 +46,14 @@ class Metricity: self.cursor.execute( """ SELECT - message_count - FROM user_has_approx_message_count + COUNT(*) + FROM messages WHERE author_id = '%s' + AND NOT is_deleted + AND channel_id NOT IN %s """, - [user_id] + [user_id, EXCLUDE_CHANNELS] ) values = self.cursor.fetchone() |