This commit is contained in:
Skillet 2023-04-17 23:11:05 -04:00
parent eeead75ba8
commit 7eb42c517b
2 changed files with 4 additions and 3 deletions

View File

@ -25,9 +25,10 @@ class Whitelist(commands.Cog):
return
updatecur = self.client.squadjs.cursor(buffered=True)
try:
rowsaffected = updatecur.execute(self.client.squadjs_updateDiscordID, (interaction.user.id, steam64))
updatecur.execute(self.client.squadjs_updateDiscordID, (interaction.user.id, steam64))
rowsaffected = updatecur.rowcount
if rowsaffected <= 0:
await interaction.response.send_message("Cound not find SteamID!")
await interaction.response.send_message("Cound not find SteamID or already linked!")
self.client.squadjs.commit()
return
except mysql.connector.Error as err:

View File

@ -39,7 +39,7 @@ class Bot(commands.Bot):
intents=intents,
help_command=commands.DefaultHelpCommand(dm_help=True),
)
self.squadjs = mysql.connector.connect(user='squadjs', password=mysqlpass, host='asgard.orion-technologies.io', database='squadjs')
self.squadjs = mysql.connector.connect(user='squadjs', password=mysqlpass, host='asgard.orion-technologies.io', database='squadjs', use_pure=False)
async def on_command(self, ctx: commands.Context):
log.info(f"{ctx.author} ({ctx.author.id}) invoked command: {ctx.command.name}, {ctx.message}")