conn = sqlite3.connect(os.path.join(PATH, "lol_data.db"))
c = conn.cursor()
+ c.execute(
+ """
+ UPDATE
+ lol_queue
+ SET
+ position = position + 1
+ WHERE
+ position >= (
+ SELECT
+ data
+ FROM
+ lol_queue_data
+ WHERE
+ name = 'queuesize'
+ )
+ """
+ )
+
c.execute(
"""
UPDATE
lol_queue
SET
available = 1,
+ position = (
+ SELECT
+ data
+ FROM
+ lol_queue_data
+ WHERE
+ name = 'queuesize'
+ )
time_remaining = time_remaining - (? - last_available)
WHERE
twitch_id = ?
)
conn.commit()
+ bot.send_privmsg(
+ message.channel,
+ f"Successfully cleaned the queue.",
+ reply=message.tags["id"],
+ )
+
conn.close()
conn = sqlite3.connect(os.path.join(PATH, "lol_data.db"))
c = conn.cursor()
+ c.execute(
+ """
+ UPDATE
+ lol_queue
+ SET
+ position = position + 1
+ WHERE
+ position >= (
+ SELECT
+ data
+ FROM
+ lol_queue_data
+ WHERE
+ name = 'queuesize'
+ )
+ """
+ )
+
c.execute(
"""
UPDATE
lol_queue
SET
available = 1,
+ position = (
+ SELECT
+ data
+ FROM
+ lol_queue_data
+ WHERE
+ name = 'queuesize'
+ )
time_remaining = time_remaining - (? - last_available)
WHERE
twitch_id = ?