fix(moderation): made the connect method raise an exception instead of returning one
Some checks failed
Pylint / Pylint (push) Failing after 1m13s

This commit is contained in:
Seaswimmer 2023-10-04 09:21:36 -04:00
parent 4c7088eb80
commit 68431095e1
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

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