From 347aa76de5e32a492ad1523fbfecd23454036795 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Wed, 1 Jan 2025 00:50:43 -0500 Subject: [PATCH] use execute_fetchall instead of cursor --- nomen/notifications.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nomen/notifications.py b/nomen/notifications.py index f49060e..f1a0bf3 100644 --- a/nomen/notifications.py +++ b/nomen/notifications.py @@ -272,11 +272,9 @@ class Notifications(Cog): log.debug(f"Listing keywords: {ctx.author} ({ctx.author.id}) on {ctx.guild} ({ctx.guild.id})") - async with ctx.bot.db.execute( - "SELECT keyword, count, regex FROM keywords WHERE guild_id=? AND user_id=?", - (ctx.guild.id, ctx.author.id), - ) as cur: - keywords = await cur.fetchall() + keywords = await ctx.bot.db.execute_fetchall( + "SELECT keyword, count, regex FROM keywords WHERE guild_id=? AND user_id=?", (ctx.guild.id, ctx.author.id) + ) embed = Embed( description="\n".join(