diff --git a/bot/add_card.py b/bot/add_card.py index fcaab43..16834a9 100644 --- a/bot/add_card.py +++ b/bot/add_card.py @@ -58,7 +58,6 @@ def add_card( card_id = insert_card( stripped_name, rarity, - RARITY_TO_WEIGHT[rarity], file_id ) return card_id, file_id diff --git a/bot/db_utils.py b/bot/db_utils.py index 94e915e..bdbd0d8 100644 --- a/bot/db_utils.py +++ b/bot/db_utils.py @@ -150,12 +150,11 @@ def is_player_administrator(username: str) -> bool: def insert_card( - name: str, rarity: int, weight: float, file_id: str) -> int: + name: str, rarity: int, file_id: str) -> int: '''Inserts a card''' CURSOR.execute( - 'INSERT INTO cards (name, rarity, weight, file_id) VALUES \ -(?, ?, ?, ?)', - (name, rarity, weight, file_id) + 'INSERT INTO cards (name, rarity, file_id) VALUES (?, ?, ?)', + (name, rarity, file_id) ) card_id = CURSOR.lastrowid return card_id if card_id else 0