Fixed old connection closing method, used new function inside of confi
This commit is contained in:
parent
3d61f9afd4
commit
547025790e
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue