con -> cur
This commit is contained in:
4
main.py
4
main.py
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user