Exemple #1
0
    def __init__(self, token):
        super(MainBot, self).__init__()

        self.bot = TelegramHigh(token)

        # the last time when the data was grabbed from server
        self.last_update_time = 1

        # the raw data about train delays
        self.data = None

        # handler of user data
        self.userparams = SubscribersHandler(
            savefile_path=SUBSCRIBERS_DATABASE_PATH,
            initial_params=INITIAL_SUBSCRIBER_PARAMS)

        self.bot.start(processingFunction=self.processUpdate,
                       periodicFunction=self.periodicRoutine)
Exemple #2
0
    def __init__(self, token):
        super(LanguageLearner, self).__init__()

        self.bot = TelegramHigh(token)

        self.databases = DB_Manager()