Sebi-Machine/run.py
annihilator708 baf1359d60 Add core
2018-05-20 21:05:17 +02:00

40 lines
1.0 KiB
Python

# !/usr/bin/python
# -*- coding: utf8 -*-
# Import packages
import discord
from discord.ext import commands
import json
# Import custom files
from src.config.config import LoadConfig
# Bot Class
class SebiMachine(commands.Bot, LoadConfig):
"""This discord is dedicated to http://www.discord.gg/GWdhBSp"""
def __init__(self):
# Initialize and attach config / settings
LoadConfig.__init__(self)
commands.Bot.__init__(self, command_prefix=self.defaultprefix)
# Load plugins
# Add your cog file name in this list
cogs = ['example']
for cog in cogs:
self.load_extension(f'src.cogs.{cog}')
async def on_ready(self):
"""On ready function"""
if self.maintenance:
print('MAINTENANCE ACTIVE')
if __name__ == '__main__':
client = SebiMachine()
# Make sure the key stays private.
with open('src/config/PrivateConfig.json') as fp:
PrivateConfig = json.load(fp)
fp.close()
client.run(PrivateConfig["bot-key"])