from HomeveeAPI.Utils.Database import Database


class FactManager:
    def __init__(self, language):
        self.language = language
        return

    def get_random(self, categories=None):
        db = Database()
        id, fact, language = db.select_one("SELECT * FROM `USELESS_FACTS` ORDER BY RAND() LIMIT 1;", ())
        return {'fact': fact}
78e540a69ff87438b866f99b5504449d8cb56a6e
<mask token>


class FactManager:
    <mask token>
    <mask token>

<mask token>


class FactManager:
    <mask token>

    def get_random(self, categories=None):
        db = Database()
        id, fact, language = db.select_one(
            'SELECT * FROM `USELESS_FACTS` ORDER BY RAND() LIMIT 1;', ())
        return {'fact': fact}

<mask token>


class FactManager:

    def __init__(self, language):
        self.language = language
        return

    def get_random(self, categories=None):
        db = Database()
        id, fact, language = db.select_one(
            'SELECT * FROM `USELESS_FACTS` ORDER BY RAND() LIMIT 1;', ())
        return {'fact': fact}

from HomeveeAPI.Utils.Database import Database


class FactManager:

    def __init__(self, language):
        self.language = language
        return

    def get_random(self, categories=None):
        db = Database()
        id, fact, language = db.select_one(
            'SELECT * FROM `USELESS_FACTS` ORDER BY RAND() LIMIT 1;', ())
        return {'fact': fact}

from HomeveeAPI.Utils.Database import Database


class FactManager:
    def __init__(self, language):
        self.language = language
        return

    def get_random(self, categories=None):
        db = Database()
        id, fact, language = db.select_one("SELECT * FROM `USELESS_FACTS` ORDER BY RAND() LIMIT 1;", ())
        return {'fact': fact}