Explicit account modification #42

Merged
waifu merged 7 commits from 35_Explicit_account_modification into dev 2025-06-03 19:06:14 -07:00
Showing only changes of commit b7d82d9117 - Show all commits

View file

@ -44,7 +44,7 @@ def get_player(username: str) -> int:
if user: if user:
return int(user[0]) 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.''' '''Insert a new player with default has_rolled = False and return their user ID.'''
CURSOR.execute( CURSOR.execute(
'INSERT INTO users (username, has_rolled) VALUES (?, ?)', 'INSERT INTO users (username, has_rolled) VALUES (?, ?)',
@ -52,7 +52,7 @@ def insert_player(username):
) )
return CURSOR.lastrowid return CURSOR.lastrowid
def delete_player(username): def delete_player(username: str) -> bool:
'''Permanently deletes a user and all their pulls.''' '''Permanently deletes a user and all their pulls.'''
CURSOR.execute( CURSOR.execute(
'SELECT id FROM users WHERE username = ?', 'SELECT id FROM users WHERE username = ?',