mirror of
https://github.com/AsgardEternal/DiscordWhitelist.git
synced 2024-12-30 15:19:12 -06:00
fixes
This commit is contained in:
parent
eeead75ba8
commit
7eb42c517b
@ -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:
|
||||
|
@ -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}")
|
||||
|
Loading…
Reference in New Issue
Block a user