mercm8 / chat-llama-discord-bot

A Discord Bot for chatting with LLaMA, Vicuna, Alpaca, or any other LLM supported by text-generation-webui or llama.cpp.
https://discord.gg/TcRGDV754Y
MIT License
16 stars 4 forks source link

Bot replies to itself when it says its own name #2

Closed Garry-Marshall closed 1 year ago

Garry-Marshall commented 1 year ago

Probably in this part of the code:

    if (self.only_speak_when_spoken_to and client.user.mentioned_in(message) \

or any(word in message.content.lower() for word in client.user.display_name.lower().split())) \ or (self.in_active_conversation(message.author.id) and message.channel.id == self.main_channel): """ If bot is set to only speak when spoken to and someone uses its name or if is in an active conversation with the user in the main channel, we reply. This is a messy one. """