init-db typo fixes

This commit is contained in:
Lili (Tlapka) 2022-10-13 13:29:38 +02:00
parent 3c5a09b2de
commit dda415f87a
3 changed files with 7 additions and 5 deletions

View File

@ -31,6 +31,8 @@ def insert_counters(db):
(redeem,)
)
db.commit()
except Error as e:
print("Failed inserting counters to db:", e.args[0])
def init_db():
db = get_db()

View File

@ -3,7 +3,7 @@ from tlapbot.db import get_db
from tlapbot.owncast_helpers import (use_points, add_to_redeem_queue,
add_to_counter, read_users_points, send_chat)
def handle_redeem(message, user_id)
def handle_redeem(message, user_id):
split_message = message[1:].split(maxsplit=1)
redeem = split_message[0]
if len(split_message) == 1:

View File

@ -9,7 +9,7 @@ CREATE TABLE points (
CREATE TABLE counters (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL
name TEXT NOT NULL,
count INTEGER NOT NULL
);