con -> cur

This commit is contained in:
2026-02-20 15:02:49 +01:00
parent 645f4d49e3
commit 07b6abcdca

View File

@@ -78,8 +78,8 @@ async def setChannel(message):
print(f"Setting channel to {channel_id} for guild {guild_id}") print(f"Setting channel to {channel_id} for guild {guild_id}")
try: try:
con = sqlite3.connect('data/ich_iel-bot.db') con = sqlite3.connect('data/ich_iel-bot.db')
con = con.cursor() cur = con.cursor()
con.execute("INSERT OR REPLACE INTO channels (guild_id, channel_id) VALUES (?, ?)", (guild_id, channel_id)) cur.execute("INSERT OR REPLACE INTO channels (guild_id, channel_id) VALUES (?, ?)", (guild_id, channel_id))
con.connection.commit() con.connection.commit()
await message.channel.send(f"Channel set to {channel_id}") await message.channel.send(f"Channel set to {channel_id}")
except sqlite3.Error as e: except sqlite3.Error as e: