def user_balance(self, chat_id):
with self.conn:
result = self.cursor.execute("SELECT 'balance' FROM 'users' WHERE 'chat_id' = ?", (chat_id,)).fetchmany(1)
return int(result[0][0])
return int(len(result[0][0]))
IndexError: list index out of range