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)
def __init__(self, token): super(LanguageLearner, self).__init__() self.bot = TelegramHigh(token) self.databases = DB_Manager()