diff --git a/discordbot/titanembeds/bot.py b/discordbot/titanembeds/bot.py index b715ccb..ecc4435 100644 --- a/discordbot/titanembeds/bot.py +++ b/discordbot/titanembeds/bot.py @@ -10,11 +10,10 @@ logging.basicConfig(filename='titanbot.log',level=logging.INFO,format='%(asctime logging.getLogger('TitanBot') logging.getLogger('sqlalchemy') -def initFirst(self): - self.bot = commands.Bot(command_prefix=config['command-prefix']) - self.aiosession = aiohttp.ClientSession(loop=self.loop) - self.http.user_agent += ' TitanEmbeds-Bot' - self.database = DatabaseInterface(self) +bot = commands.Bot(command_prefix=config['command-prefix']) +aiosession = aiohttp.ClientSession(loop=loop) +http.user_agent += ' TitanEmbeds-Bot' +database = DatabaseInterface() initFirst() diff --git a/discordbot/titanembeds/database/__init__.py b/discordbot/titanembeds/database/__init__.py index bd63774..e39ddfc 100644 --- a/discordbot/titanembeds/database/__init__.py +++ b/discordbot/titanembeds/database/__init__.py @@ -16,7 +16,7 @@ from titanembeds.database.guild_members import GuildMembers from titanembeds.database.unauthenticated_users import UnauthenticatedUsers from titanembeds.database.unauthenticated_bans import UnauthenticatedBans -class DatabaseInterface(object): +class DatabaseInterface(): # Courtesy of https://github.com/SunDwarf/Jokusoramame def __init__(self, bot): self.bot = bot