1
0
Fork 0
mirror of synced 2024-06-11 07:04:36 +12:00

Fixed old connection closing method, used new function inside of confi

This commit is contained in:
phxntxm 2016-07-10 16:18:30 -05:00
parent 3d61f9afd4
commit 547025790e
2 changed files with 13 additions and 12 deletions

View file

@ -12,6 +12,7 @@ import re
class Core:
"""Core commands, these are the not 'complicated' commands."""
def __init__(self, bot):
self.bot = bot
@ -28,7 +29,8 @@ class Core:
perms.embed_links = True
perms.read_message_history = True
perms.attach_files = True
await self.bot.say("Use this URL to add me to a server that you'd like!\n{}".format(discord.utils.oauth_url('183748889814237186',perms)))
await self.bot.say("Use this URL to add me to a server that you'd like!\n{}"
.format(discord.utils.oauth_url('183748889814237186', perms)))
@commands.command()
async def joke(self):

View file

@ -36,8 +36,7 @@ def updateBattleRecords(winner, loser):
sql = "insert into battle_records (id,record) values ('{0}','1-0')".format(winner.id)
cursor.execute(sql)
config.connection.commit()
config.connection.close()
config.closeConnection()
# Update losers records
sql = "select record from battle_records where id={0}".format(loser.id)