From 5133aab849e627f24e59f660aafc1262e2140510 Mon Sep 17 00:00:00 2001 From: Luna Mendes Date: Sun, 28 Oct 2018 00:01:59 -0300 Subject: [PATCH] guild.mod: fix get_prune --- litecord/blueprints/guild/mod.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litecord/blueprints/guild/mod.py b/litecord/blueprints/guild/mod.py index 0e8c817..3d8cb3b 100644 --- a/litecord/blueprints/guild/mod.py +++ b/litecord/blueprints/guild/mod.py @@ -121,11 +121,11 @@ async def get_prune(guild_id: int, days: int) -> list: - don't have any roles. """ # a good solution would be in pure sql. - member_ids = await app.storage.fetch(f""" + member_ids = await app.db.fetch(f""" SELECT id FROM users JOIN members - ON member.guild_id = $1 AND member.user_id = users.id + ON members.guild_id = $1 AND members.user_id = users.id WHERE users.last_session < (now() - (interval '{days} days')) """, guild_id)