Added extensions to the config file instead of by default
This commit is contained in:
parent
b4e7f4adbe
commit
280728721e
2 changed files with 5 additions and 21 deletions
24
bot.py
24
bot.py
|
@ -11,30 +11,12 @@ os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from cogs.utils import config
|
from cogs.utils import config
|
||||||
|
|
||||||
extensions = ['cogs.interaction',
|
|
||||||
'cogs.core',
|
|
||||||
'cogs.mod',
|
|
||||||
'cogs.owner',
|
|
||||||
'cogs.stats',
|
|
||||||
'cogs.playlist',
|
|
||||||
'cogs.twitch',
|
|
||||||
'cogs.picarto',
|
|
||||||
'cogs.overwatch',
|
|
||||||
'cogs.links',
|
|
||||||
'cogs.tags',
|
|
||||||
'cogs.roles',
|
|
||||||
'cogs.strawpoll',
|
|
||||||
'cogs.tictactoe',
|
|
||||||
'cogs.hangman',
|
|
||||||
'cogs.statsupdate',
|
|
||||||
'cogs.da',
|
|
||||||
'cogs.raffle']
|
|
||||||
|
|
||||||
opts = {'command_prefix': config.command_prefix,
|
opts = {'command_prefix': config.command_prefix,
|
||||||
'description': config.bot_description,
|
'description': config.bot_description,
|
||||||
'pm_help': None,
|
'pm_help': None,
|
||||||
'shard_count': config.shard_count,
|
'shard_count': config.shard_count,
|
||||||
'shard_id': config.shard_id}
|
'shard_id': config.shard_id,
|
||||||
|
'command_not_found': ''}
|
||||||
|
|
||||||
bot = commands.Bot(**opts)
|
bot = commands.Bot(**opts)
|
||||||
logging.basicConfig(level=logging.INFO, filename='bonfire.log')
|
logging.basicConfig(level=logging.INFO, filename='bonfire.log')
|
||||||
|
@ -174,6 +156,6 @@ async def on_command_error(error, ctx):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
for e in extensions:
|
for e in config.extensions:
|
||||||
bot.load_extension(e)
|
bot.load_extension(e)
|
||||||
bot.run(config.bot_token)
|
bot.run(config.bot_token)
|
||||||
|
|
|
@ -65,6 +65,8 @@ da_secret = global_config.get("da_secret", "")
|
||||||
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', "")
|
user_agent = global_config.get('user_agent', "")
|
||||||
|
# The extensions to load
|
||||||
|
extensions = global_config.get('extensions', [])
|
||||||
|
|
||||||
# The variables needed for sharding
|
# The variables needed for sharding
|
||||||
shard_count = global_config.get('shard_count', 1)
|
shard_count = global_config.get('shard_count', 1)
|
||||||
|
|
Loading…
Reference in a new issue