use execute_fetchall instead of cursor

This commit is contained in:
Infinidoge 2025-01-01 00:50:43 -05:00
parent 76521c9d82
commit 347aa76de5
Signed by: Infinidoge
SSH key fingerprint: SHA256:GT2StvPQMMfFHyiiFJymQxfTG/z6EWLJ6NWItf5K5sA

View file

@ -272,11 +272,9 @@ class Notifications(Cog):
log.debug(f"Listing keywords: {ctx.author} ({ctx.author.id}) on {ctx.guild} ({ctx.guild.id})") log.debug(f"Listing keywords: {ctx.author} ({ctx.author.id}) on {ctx.guild} ({ctx.guild.id})")
async with ctx.bot.db.execute( keywords = await ctx.bot.db.execute_fetchall(
"SELECT keyword, count, regex FROM keywords WHERE guild_id=? AND user_id=?", "SELECT keyword, count, regex FROM keywords WHERE guild_id=? AND user_id=?", (ctx.guild.id, ctx.author.id)
(ctx.guild.id, ctx.author.id), )
) as cur:
keywords = await cur.fetchall()
embed = Embed( embed = Embed(
description="\n".join( description="\n".join(