fixed bug where llama sometimes wasnt enabled or disabled
This commit is contained in:
parent
995bb08a0a
commit
49c10f0bf5
1 changed files with 8 additions and 5 deletions
|
|
@ -159,11 +159,14 @@ class Llama(commands.Cog):
|
|||
channel_vars = await self.get_channel_config(message.channel.id)
|
||||
chat_history_string = await self.log_chat_and_get_history(message, logfile, channel_vars)
|
||||
# Chat Response
|
||||
if channel_vars["llama_enabled"] and not message.author.bot or self.bot_id in [x.id for x in message.mentions]:
|
||||
if message.content and message.content[0] != "!":
|
||||
await self.chat_response(message, channel_vars, chat_history_string)
|
||||
elif not message.content:
|
||||
await self.chat_response(message, channel_vars, chat_history_string)
|
||||
try:
|
||||
if channel_vars["llama_enabled"] and not message.author.bot or self.bot_id in [x.id for x in message.mentions]:
|
||||
if message.content and message.content[0] != "!":
|
||||
await self.chat_response(message, channel_vars, chat_history_string)
|
||||
elif not message.content:
|
||||
await self.chat_response(message, channel_vars, chat_history_string)
|
||||
except:
|
||||
self.edit_channel_config(message.channel.id, "llama_enabled", False)
|
||||
|
||||
|
||||
async def setup(bot):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue