fix(chat): do not respond with llm in private messages

This commit is contained in:
The0Mikkel 2024-05-28 01:09:52 +02:00
parent 886a45937d
commit 84c528b751

7
bot.py
View File

@ -109,6 +109,13 @@ class Bot:
if not content:
return
# Do not respond with llm in private messages
if isinstance(message.channel, discord.DMChannel):
response = DiscordResponse(message)
await response.write(message, 'I am sorry, I am unable to respond in private messages.')
return
# Admin commands
if content == 'RESET' and str(message.author.id) == self.admin_id:
await self.flush_channel(str(message.channel.id))
logging.info('Chat reset by admin in guild %s', message.channel.guild.name)