Add core
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: <encoding name> -*-
|
||||
|
||||
from discord.ext import commands
|
||||
import discord
|
||||
|
||||
class CogName:
|
||||
"""
|
||||
CogName should be the name of the cog
|
||||
"""
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.command()
|
||||
async def ping(self, ctx):
|
||||
"""Say pong"""
|
||||
await ctx.send('Pong')
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(CogName(bot))
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: <encoding name> -*-
|
||||
|
||||
import json
|
||||
import psycopg2
|
||||
import psycopg2.extensions
|
||||
|
||||
class LoadConfig:
|
||||
"""
|
||||
All config is collected here
|
||||
"""
|
||||
def __init__(self):
|
||||
# Read our config file
|
||||
with open('src/config/Config.json') as fp:
|
||||
self.config = json.load(fp)
|
||||
|
||||
# Initialize config
|
||||
self.ownerlist = self.config["ownerlist"]
|
||||
self.defaultprefix = self.config["prefix"]
|
||||
self.version = self.config["version"]
|
||||
self.display_name = self.config["display_name"]
|
||||
self.maintenance = self.config["maintenance"]
|
||||
if self.maintenance == 'False':
|
||||
self.maintenance = False
|
||||
else:
|
||||
self.maintenance = True
|
||||
Reference in New Issue
Block a user