diff --git a/autowl/Cogs/Whitelist.py b/autowl/Cogs/Whitelist.py index 8028fd6..54aa3ff 100644 --- a/autowl/Cogs/Whitelist.py +++ b/autowl/Cogs/Whitelist.py @@ -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: diff --git a/autowl/bot.py b/autowl/bot.py index 2508c97..3d0cfb5 100644 --- a/autowl/bot.py +++ b/autowl/bot.py @@ -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}")