From f5b2d077e21d6e345c0bc3c0d9bf0403ecc21292 Mon Sep 17 00:00:00 2001 From: Paillat Date: Sat, 4 Feb 2023 21:24:45 +0100 Subject: [PATCH] Update moderation.py --- code/cogs/moderation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/cogs/moderation.py b/code/cogs/moderation.py index 512ecf2..2d9ce53 100644 --- a/code/cogs/moderation.py +++ b/code/cogs/moderation.py @@ -46,6 +46,7 @@ class Moderation (discord.Cog): c.execute("INSERT INTO moderation VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", (str(ctx.guild.id), str(log_channel.id), enable, str(moderator_role.id), toxicity, severe_toxicity, identity_attack, insult, profanity, threat, sexually_explicit, flirtation, obscene, spam)) conn.commit() await ctx.respond(content="Moderation has been enabled!", ephemeral=True) + return else: #for each value we check if it's none. If it's none and there's no value in the database, we set it to 0.40, otherwise we set it to the value in the database if toxicity is None and data[4] is not None: toxicity = data[4] @@ -143,4 +144,4 @@ class Moderation (discord.Cog): embed = discord.Embed(title="Moderation AI help", description="Here is a list of all the moderation commands", color=discord.Color.blurple()) for definition in tox.toxicity_definitions: embed.add_field(name=tox.toxicity_names[tox.toxicity_definitions.index(definition)], value=definition, inline=False) - await ctx.respond(embed=embed, ephemeral=True) + await ctx.respond(embed=embed, ephemeral=True) \ No newline at end of file