kevinthedang / discord-ollama

Discord Bot that utilizes Ollama to interact with any Large Language Models to talk with users and allow them to host/create their own models.
Creative Commons Attribution 4.0 International
45 stars 5 forks source link

Respond Only On Mention #5

Closed JT2M0L3Y closed 5 months ago

JT2M0L3Y commented 5 months ago

Steps to reproduce

  1. type something in a channel that this bot is authorized to scan input on
  2. wait for response, see that anything you type (even if you mention someone else) is picked up by the bot

Evidence

image

image

kevinthedang commented 5 months ago

This is an interesting idea as then there would be no need for channelId checking. Instead we can parse the input, check if the userId matches the bot, then truncate it as it does not like to have "personal information" in its input even though that is the bots info.

Still might enforce channel restrictions because then we can ensure that when someone really needs to use the bot, it will be in the channel designated for it.

JT2M0L3Y commented 5 months ago

This works now, waiting to pull new changes from persist.

JT2M0L3Y commented 5 months ago

Merged into persist2, working with new changes there!