Update moderation.py

This commit is contained in:
Paillat
2023-02-04 21:24:45 +01:00
parent 486f49a7b1
commit f5b2d077e2

View File

@@ -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)