diff --git a/litecord/blueprints/users.py b/litecord/blueprints/users.py index 0f75891..cd47013 100644 --- a/litecord/blueprints/users.py +++ b/litecord/blueprints/users.py @@ -318,7 +318,8 @@ async def patch_current_settings(): await app.db.execute(f""" UPDATE user_settings SET {key}=$1 - """, j[key]) + WHERE id = $2 + """, j[key], user_id) settings = await app.storage.get_user_settings(user_id) await app.dispatcher.dispatch_user( diff --git a/litecord/pubsub/lazy_guild.py b/litecord/pubsub/lazy_guild.py index b2e4b59..7658ca5 100644 --- a/litecord/pubsub/lazy_guild.py +++ b/litecord/pubsub/lazy_guild.py @@ -496,7 +496,7 @@ class GuildMemberList: """Return if a state's ranges include the given item index.""" - ranges = self.state[sess_id] + ranges = self.state[session_id] for range_start, range_end in ranges: if range_start <= item_index <= range_end: