🐛 fix(chat.py): fix typo in message.channel.send() method call

🔒 chore(chat.py): add moderation check for message content in call_function() to prevent sending blocked messages
🔒 chore(chat.py): add moderation check for query in call_function() to prevent sending blocked queries
🔒 chore(makeprompt.py): add moderation check for content in chatgpt_process() to prevent sending blocked content
🔒 chore(makeprompt.py): add depth check to prevent recursive answering in chatgpt_process()
This commit is contained in:
2023-08-16 09:20:29 +02:00
parent d520b8b87c
commit 303d3c07ac
3 changed files with 29 additions and 15 deletions

View File

@@ -107,7 +107,7 @@ class Chat(discord.Cog):
if message.content.startswith("botator!unban"):
user2ban = message.content.split(" ")[1]
await banusr.unbanuser(user2ban)
await message.channel.send(f"User {user2ban} unbanned !")
await message.chafnnel.send(f"User {user2ban} unbanned !")
return
if str(message.author.id) in banusr.banend_users:
await asyncio.sleep(2)
@@ -115,11 +115,6 @@ class Chat(discord.Cog):
return
await mp.chat_process(self, message)
@discord.slash_command(name="say", description="Say a message")
async def say(self, ctx: discord.ApplicationContext, message: str):
await ctx.respond("Message sent !", ephemeral=True)
await ctx.send(message)
@discord.slash_command(name="redo", description="Redo a message")
async def redo(self, ctx: discord.ApplicationContext):
history = await ctx.channel.history(limit=2).flatten()