diff --git a/bot/db_utils.py b/bot/db_utils.py index 88660d9..5597bc5 100644 --- a/bot/db_utils.py +++ b/bot/db_utils.py @@ -44,7 +44,7 @@ def get_player(username: str) -> int: if user: return int(user[0]) -def insert_player(username): +def insert_player(username: str) -> int: '''Insert a new player with default has_rolled = False and return their user ID.''' CURSOR.execute( 'INSERT INTO users (username, has_rolled) VALUES (?, ?)', @@ -52,7 +52,7 @@ def insert_player(username): ) return CURSOR.lastrowid -def delete_player(username): +def delete_player(username: str) -> bool: '''Permanently deletes a user and all their pulls.''' CURSOR.execute( 'SELECT id FROM users WHERE username = ?',