misc(moderation): changed how the connectionrefusederror is raised in connect method
Some checks failed
Pylint / Pylint (push) Failing after 1m13s

This commit is contained in:
Seaswimmer 2023-10-04 09:23:32 -04:00
parent 68431095e1
commit 3d2092ec3b
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -50,8 +50,8 @@ class Moderation(commands.Cog):
)
return connection
except mysql.connector.ProgrammingError as e:
logging.fatal("Unable to access the MySQL database!\nError:\n%s", e)
raise ConnectionRefusedError
logging.fatal("Unable to access the MySQL database!\nError:\n%s", e.msg)
raise ConnectionRefusedError(f"Unable to access the MySQL Database!\n{e.msg}")
async def create_guild_table(self, guild: discord.Guild):
database = await self.connect()