def __init__(self): super().__init__(self.get_prefix, case_insensitive=True) logging.init_logging() self.db_client = init_client(self.loop) if self.db_client: logger.info("Connected to Database.") self.config = get_config() if self.config["trello"]["enabled"]: self.trello_client, self.trello_board = trelloinit(self.config) self.admin_db = self.db_client["management"] self.users_db = self.db_client["users"] if self.config["slothpixel_key"]: self.slothpixel_key_string = f'?key={self.config["slothpixel_key"]}' else: self.slothpixel_key_string = '' self.guilds_db = self.db_client["guilds"] self.scammer_db = self.db_client["scammer"] self.status_list = cycle(self.config["status_list"]) self.remove_command("help") self.api_keys = self.config["api_keys"] if not self.api_keys: logger.warning( "PLEASE SET AT LEAST ON API KEY, ELSE THE BOT WON'T WORK.") self.events = [] self.load_cogs()
def __init__(self): super().__init__(self.get_prefix, case_insensitive=True, intents=intents) logging.init_logging() logger.info([z for z in self.intents]) self.db_client = init_client(self.loop) if self.db_client: logger.info("Connected to Database.") self.config = get_config() self.custom_emojis = get_config("emojis") if self.config["trello"]["enabled"]: self.trello_client, self.trello_board = trelloinit(self.config) self.admin_db = self.db_client["management"] self.users_db = self.db_client["users"] if self.config["slothpixel_key"]: self.slothpixel_key_string = f'?key={self.config["slothpixel_key"]}' else: self.slothpixel_key_string = '' if self.config["stats_api"] == "default": self.stats_api = "http://hypixel-skybot.ddns.net:3000/stats" else: self.stats_api = self.config["stats_api"] self.guilds_db = self.db_client["guilds"] self.scammer_db = self.db_client["scammer"] self.status_list = cycle(self.config["status_list"]) self.remove_command("help") self.api_keys = self.config["api_keys"] if not self.api_keys: logger.warning( "PLEASE SET AT LEAST ON API KEY, ELSE THE BOT WON'T WORK.") self.events = [] self.slash = SlashCommand(self, sync_commands=True) self.load_cogs() self.start_time = time()