def load(self, ctx): super().load(ctx) Pages.register("guide", self.initialize_page, self.update_page) if not os.path.isfile("experiments.json"): self.experiments = {"dm-guide-on-join": 25} return with open("experiments.json", "r") as experiments: # if this errors, dabbit didn't do the config right. self.experiments = json.loads(experiments.readline())
def load(self, ctx): super().load(ctx) self.client = MongoClient(self.config.mongodb_host, self.config.mongodb_port, username=self.config.mongodb_username, password=self.config.mongodb_password) self.database = self.client.get_database("experience") self.users = self.database.get_collection("users") self.actions = self.database.get_collection("actions") self.purchases = self.database.get_collection("purchases") Pages.register("xp_store", self.initialize_pages, self.update_page)
def load(self, ctx): super().load(ctx) self.load_event_stats() Pages.register("participants", self.init_participants, self.update_participants)
def load(self, ctx): super(GuidePlugin, self).load(ctx) Pages.register("guide", self.initialize_page, self.update_page)