diff --git a/utils/config.py b/utils/config.py index 8cf0f72..a2f8d4a 100644 --- a/utils/config.py +++ b/utils/config.py @@ -10,7 +10,9 @@ try: global_config = yaml.safe_load(f) global_config = {k: v for k, v in global_config.items() if v} except FileNotFoundError: - print("You have no config file setup! Please use config.yml.sample to setup a valid config file") + print( + "You have no config file setup! Please use config.yml.sample to setup a valid config file" + ) quit() try: @@ -25,32 +27,32 @@ bot_description = global_config.get("description") # Bot's default prefix for commands default_prefix = global_config.get("command_prefix", "!") # The key for bot sites (discord bots and discordbots are TWO DIFFERENT THINGS) -discord_bots_key = global_config.get('discord_bots_key', "") -discordbots_key = global_config.get('discordbots_key', "") -carbon_key = global_config.get('carbon_key', "") +discord_bots_key = global_config.get("discord_bots_key", "") +discordbots_key = global_config.get("discordbots_key", "") +carbon_key = global_config.get("carbon_key", "") # The client ID for twitch requests -twitch_key = global_config.get('twitch_key', "") +twitch_key = global_config.get("twitch_key", "") # The key for youtube API calls youtube_key = global_config.get("youtube_key", "") # The key for Osu API calls -osu_key = global_config.get('osu_key', '') +osu_key = global_config.get("osu_key", "") # The key for e621 calls -e621_key = global_config.get('e621_key', '') +e621_key = global_config.get("e621_key", "") # The username the API key is under -e621_user = global_config.get('e621_user', '') +e621_user = global_config.get("e621_user", "") # The key for League of Legends API calls -lol_key = global_config.get('lol_key', '') +lol_key = global_config.get("lol_key", "") # The keys needed for deviant art calls # The invite link for the server made for the bot dev_server = global_config.get("dev_server", "") # The User-Agent that we'll use for most requests -user_agent = global_config.get('user_agent', None) +user_agent = global_config.get("user_agent", None) # The URL to proxy youtube_dl's requests through -ytdl_proxy = global_config.get('youtube_dl_proxy', None) +ytdl_proxy = global_config.get("youtube_dl_proxy", None) # The patreon key, as well as the patreon ID to use -patreon_key = global_config.get('patreon_key', None) -patreon_id = global_config.get('patreon_id', None) -patreon_link = global_config.get('patreon_link', None) +patreon_key = global_config.get("patreon_key", None) +patreon_id = global_config.get("patreon_id", None) +patreon_link = global_config.get("patreon_link", None) # The client ID/secret for spotify spotify_id = global_config.get("spotify_id", None) spotify_secret = global_config.get("spotify_secret", None) @@ -59,45 +61,52 @@ error_channel = global_config.get("error_channel", None) # The extensions to load extensions = [ - 'cogs.interaction', - 'cogs.misc', - 'cogs.mod', - 'cogs.admin', - 'cogs.config', - 'cogs.images', - 'cogs.birthday', - 'cogs.owner', - 'cogs.stats', - 'cogs.picarto', - 'cogs.links', - 'cogs.roles', - 'cogs.tictactoe', - 'cogs.hangman', - 'cogs.events', - 'cogs.raffle', - 'cogs.blackjack', - 'cogs.osu', - 'cogs.tags', - 'cogs.roulette', - 'cogs.spotify', - 'cogs.polls' + "cogs.interaction", + "cogs.misc", + "cogs.mod", + "cogs.admin", + "cogs.config", + "cogs.images", + "cogs.birthday", + "cogs.owner", + "cogs.stats", + "cogs.picarto", + "cogs.links", + "cogs.roles", + "cogs.tictactoe", + "cogs.hangman", + "cogs.events", + "cogs.raffle", + "cogs.blackjack", + "cogs.osu", + "cogs.tags", + "cogs.roulette", + "cogs.spotify", + "cogs.polls", + "cogs.games", ] # The default status the bot will use default_status = global_config.get("default_status", None) # The database hostname -db_host = global_config.get('db_host', None) +db_host = global_config.get("db_host", None) # The database name -db_name = global_config.get('db_name', 'bonfire') +db_name = global_config.get("db_name", "bonfire") # The database port -db_port = global_config.get('db_port', None) +db_port = global_config.get("db_port", None) # The user and password assigned -db_user = global_config.get('db_user', None) -db_pass = global_config.get('db_pass', None) +db_user = global_config.get("db_user", None) +db_pass = global_config.get("db_pass", None) # We've set all the options we need to be able to connect # so create a dictionary that we can use to unload to connect -db_opts = {'host': db_host, 'database': db_name, 'port': db_port, 'user': db_user, 'password': db_pass} +db_opts = { + "host": db_host, + "database": db_name, + "port": db_port, + "user": db_user, + "password": db_pass, +} def command_prefix(bot, message):