1
0
Fork 0
mirror of synced 2024-05-05 05:02:30 +12:00

Include games to start by default

This commit is contained in:
Dan Hess 2020-11-07 15:22:06 -06:00
parent 4a45d5ce2b
commit 59a9dc23b9

View file

@ -10,7 +10,9 @@ try:
global_config = yaml.safe_load(f) global_config = yaml.safe_load(f)
global_config = {k: v for k, v in global_config.items() if v} global_config = {k: v for k, v in global_config.items() if v}
except FileNotFoundError: 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() quit()
try: try:
@ -25,32 +27,32 @@ bot_description = global_config.get("description")
# Bot's default prefix for commands # Bot's default prefix for commands
default_prefix = global_config.get("command_prefix", "!") default_prefix = global_config.get("command_prefix", "!")
# The key for bot sites (discord bots and discordbots are TWO DIFFERENT THINGS) # The key for bot sites (discord bots and discordbots are TWO DIFFERENT THINGS)
discord_bots_key = global_config.get('discord_bots_key', "") discord_bots_key = global_config.get("discord_bots_key", "")
discordbots_key = global_config.get('discordbots_key', "") discordbots_key = global_config.get("discordbots_key", "")
carbon_key = global_config.get('carbon_key', "") carbon_key = global_config.get("carbon_key", "")
# The client ID for twitch requests # 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 # The key for youtube API calls
youtube_key = global_config.get("youtube_key", "") youtube_key = global_config.get("youtube_key", "")
# The key for Osu API calls # 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 # 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 # 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 # 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 keys needed for deviant art calls
# The invite link for the server made for the bot # The invite link for the server made for the bot
dev_server = global_config.get("dev_server", "") dev_server = global_config.get("dev_server", "")
# The User-Agent that we'll use for most requests # 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 # 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 # The patreon key, as well as the patreon ID to use
patreon_key = global_config.get('patreon_key', None) patreon_key = global_config.get("patreon_key", None)
patreon_id = global_config.get('patreon_id', None) patreon_id = global_config.get("patreon_id", None)
patreon_link = global_config.get('patreon_link', None) patreon_link = global_config.get("patreon_link", None)
# The client ID/secret for spotify # The client ID/secret for spotify
spotify_id = global_config.get("spotify_id", None) spotify_id = global_config.get("spotify_id", None)
spotify_secret = global_config.get("spotify_secret", 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 # The extensions to load
extensions = [ extensions = [
'cogs.interaction', "cogs.interaction",
'cogs.misc', "cogs.misc",
'cogs.mod', "cogs.mod",
'cogs.admin', "cogs.admin",
'cogs.config', "cogs.config",
'cogs.images', "cogs.images",
'cogs.birthday', "cogs.birthday",
'cogs.owner', "cogs.owner",
'cogs.stats', "cogs.stats",
'cogs.picarto', "cogs.picarto",
'cogs.links', "cogs.links",
'cogs.roles', "cogs.roles",
'cogs.tictactoe', "cogs.tictactoe",
'cogs.hangman', "cogs.hangman",
'cogs.events', "cogs.events",
'cogs.raffle', "cogs.raffle",
'cogs.blackjack', "cogs.blackjack",
'cogs.osu', "cogs.osu",
'cogs.tags', "cogs.tags",
'cogs.roulette', "cogs.roulette",
'cogs.spotify', "cogs.spotify",
'cogs.polls' "cogs.polls",
"cogs.games",
] ]
# The default status the bot will use # The default status the bot will use
default_status = global_config.get("default_status", None) default_status = global_config.get("default_status", None)
# The database hostname # The database hostname
db_host = global_config.get('db_host', None) db_host = global_config.get("db_host", None)
# The database name # The database name
db_name = global_config.get('db_name', 'bonfire') db_name = global_config.get("db_name", "bonfire")
# The database port # The database port
db_port = global_config.get('db_port', None) db_port = global_config.get("db_port", None)
# The user and password assigned # The user and password assigned
db_user = global_config.get('db_user', None) db_user = global_config.get("db_user", None)
db_pass = global_config.get('db_pass', None) db_pass = global_config.get("db_pass", None)
# We've set all the options we need to be able to connect # 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 # 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): def command_prefix(bot, message):