Old copypaste fail - we were returning the most recent user id when creating channels

(Database.py)
This commit is contained in:
jesopo 2019-02-10 00:04:00 +00:00
parent 20d75e9716
commit 1d807fefe0

View file

@ -39,7 +39,7 @@ class Channels(Table):
(server_id, name) VALUES (?, ?)""",
[server_id, name.lower()])
return self.database.execute_fetchone(
"SELECT user_id FROM users ORDER BY user_id DESC LIMIT 1")[0]
"SELECT channel_id FROM channels ORDER BY channel_id DESC LIMIT 1")[0]
def delete(self, channel_id: int):
self.database.execute("DELETE FROM channels WHERE channel_id=?",
[channel_id])