Added commands I think

This commit is contained in:
JustMaffie 2017-05-27 23:49:41 +02:00
parent fb304a6337
commit 0b0662e06c
2 changed files with 5 additions and 6 deletions

View File

@ -10,11 +10,10 @@ logging.basicConfig(filename='titanbot.log',level=logging.INFO,format='%(asctime
logging.getLogger('TitanBot') logging.getLogger('TitanBot')
logging.getLogger('sqlalchemy') logging.getLogger('sqlalchemy')
def initFirst(self): bot = commands.Bot(command_prefix=config['command-prefix'])
self.bot = commands.Bot(command_prefix=config['command-prefix']) aiosession = aiohttp.ClientSession(loop=loop)
self.aiosession = aiohttp.ClientSession(loop=self.loop) http.user_agent += ' TitanEmbeds-Bot'
self.http.user_agent += ' TitanEmbeds-Bot' database = DatabaseInterface()
self.database = DatabaseInterface(self)
initFirst() initFirst()

View File

@ -16,7 +16,7 @@ from titanembeds.database.guild_members import GuildMembers
from titanembeds.database.unauthenticated_users import UnauthenticatedUsers from titanembeds.database.unauthenticated_users import UnauthenticatedUsers
from titanembeds.database.unauthenticated_bans import UnauthenticatedBans from titanembeds.database.unauthenticated_bans import UnauthenticatedBans
class DatabaseInterface(object): class DatabaseInterface():
# Courtesy of https://github.com/SunDwarf/Jokusoramame # Courtesy of https://github.com/SunDwarf/Jokusoramame
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot