diff --git a/tle/util/db/user_db_conn.py b/tle/util/db/user_db_conn.py index 1af18faf..527f0976 100644 --- a/tle/util/db/user_db_conn.py +++ b/tle/util/db/user_db_conn.py @@ -475,11 +475,11 @@ def add_starboard_message(self, original_msg_id, starboard_msg_id, guild_id): self.conn.commit() def check_exists_starboard_message(self, original_msg_id): - query = ('SELECT 1 ' + query = ('SELECT COUNT(*) AS cnt ' 'FROM starboard_message ' 'WHERE original_msg_id = ?') res = self.conn.execute(query, (original_msg_id,)).fetchone() - return res is not None + return res.cnt != 0 def remove_starboard_message(self, *, original_msg_id=None, starboard_msg_id=None): assert (original_msg_id is None) ^ (starboard_msg_id is None)