From a99bd711a70a3ab457bc320dea6dbd9bbc315e1b Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh <102361830+SeaswimmerTheFsh@users.noreply.github.com> Date: Wed, 21 Jun 2023 09:22:40 -0400 Subject: [PATCH] pylint fixes --- cogs/moderation.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cogs/moderation.py b/cogs/moderation.py index 6c534bc..dec0ed4 100644 --- a/cogs/moderation.py +++ b/cogs/moderation.py @@ -20,7 +20,7 @@ class Moderation(commands.Cog): self.bot = bot disable_dateutil() - def mysql_log(self, type, target_id, duration, reason): + def moddb_log(self, type, target_id, duration, reason): moddb = mysql.connector.connect(host=db_host,user=db_user,password=db_password,database=db) cursor = moddb.cursor() cursor.execute("SELECT moderation_id FROM `mod` ORDER BY moderation_id DESC LIMIT 1") @@ -41,9 +41,9 @@ class Moderation(commands.Cog): return # await target.timeout(parsed_time) await ctx.message.reply(f"{target.mention} has been timed out for {str(parsed_time)}!\n**Reason** - `{reason}`") - embeds = [revolt.SendableEmbed(title="Timed Out", description=f"You have been timed out for {str(parsed_time)}.\n### Reason\n`{reason}", colour="#5d82d1")] + # embeds = [revolt.SendableEmbed(title="Timed Out", description=f"You have been timed out for {str(parsed_time)}.\n### Reason\n`{reason}", colour="#5d82d1")] # await target.send(embeds=embeds) - Moderation.mysql_log(self, type='Timeout', target_id=target.id, duration=parsed_time, reason=reason) + Moderation.moddb_log(self, type='Timeout', target_id=target.id, duration=parsed_time, reason=reason) @commands.command() async def warn(self, ctx: commands.Context, target: commands.MemberConverter, *, reason: str): @@ -51,9 +51,9 @@ class Moderation(commands.Cog): await ctx.message.reply("Please include a reason!") return await ctx.message.reply(f"{target.mention} has been warned!\n**Reason** - `{reason}`") - embeds = [revolt.SendableEmbed(title="Warned", description=f"You have been warned.\n### Reason\n`{reason}", colour="#5d82d1")] + # embeds = [revolt.SendableEmbed(title="Warned", description=f"You have been warned.\n### Reason\n`{reason}", colour="#5d82d1")] # await target.send(embeds=embeds) - Moderation.mysql_log(self, type='Warning', target_id=target.id, duration='NULL', reason=reason) + Moderation.moddb_log(self, type='Warning', target_id=target.id, duration='NULL', reason=reason) @commands.command() async def ban(self, ctx: commands.Context, target: commands.MemberConverter, *, reason: str): @@ -61,11 +61,11 @@ class Moderation(commands.Cog): await ctx.message.reply("Please include a reason!") return try: - embeds = [revolt.SendableEmbed(title="Banned", description=f"You have been banned.\n### Reason\n`{reason}", colour="#5d82d1")] + # embeds = [revolt.SendableEmbed(title="Banned", description=f"You have been banned.\n### Reason\n`{reason}", colour="#5d82d1")] # await target.send(embeds=embeds) await target.ban(reason=reason) await ctx.message.reply(f"{target.mention} has been banned!\n**Reason** - `{reason}`") - Moderation.mysql_log(self, type='Ban', target_id=target.id, duration='NULL', reason=reason) + Moderation.moddb_log(self, type='Ban', target_id=target.id, duration='NULL', reason=reason) except revolt.errors.HTTPError: await ctx.message.reply(f"{target.mention} is already banned!") @@ -73,10 +73,10 @@ class Moderation(commands.Cog): async def unban(self, ctx: commands.Context, target: commands.MemberConverter): try: await target.unban() - embeds = [revolt.SendableEmbed(title="Unbanned", description=f"You have been unbanned.", colour="#5d82d1")] + # embeds = [revolt.SendableEmbed(title="Unbanned", description="You have been unbanned.", colour="#5d82d1")] # await target.send(embeds=embeds) await ctx.message.reply(f"{target.mention} has been unbanned!") - Moderation.mysql_log(self, type='Unban', target_id=target.id, duration='NULL', reason=f'Unbanned through {prefix}unban') + Moderation.moddb_log(self, type='Unban', target_id=target.id, duration='NULL', reason=f'Unbanned through {prefix}unban') except revolt.errors.HTTPError: await ctx.message.reply(f"{target.mention} is not banned!") return