fix(chat): do not respond with llm in private messages
This commit is contained in:
parent
886a45937d
commit
84c528b751
7
bot.py
7
bot.py
@ -109,6 +109,13 @@ class Bot:
|
|||||||
if not content:
|
if not content:
|
||||||
return
|
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:
|
if content == 'RESET' and str(message.author.id) == self.admin_id:
|
||||||
await self.flush_channel(str(message.channel.id))
|
await self.flush_channel(str(message.channel.id))
|
||||||
logging.info('Chat reset by admin in guild %s', message.channel.guild.name)
|
logging.info('Chat reset by admin in guild %s', message.channel.guild.name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user