Skip to content

Commit

Permalink
New updated towards pull The0mikkel#2
Browse files Browse the repository at this point in the history
  • Loading branch information
Halfdan authored and Halfdan committed May 28, 2024
1 parent 3c7feb0 commit 985f416
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The bot can be configured by setting the following environment variables:
- `REDIS_HOST`: The host for the Redis server.
- `REDIS_PORT`: The port for the Redis server.
- `ADMIN_ID`: The Discord ID of the admin user. This user will have the ability to reset the chat.
- `CHAT_CHANNEL_ID`: The Discord ID of the channel the bot will chat in. Leave empty to allow chatting in all channels.
- `CHAT_CHANNEL_ID`: The Discord ID of the specific channel where the bot will chat. By default, leave this empty to allow the bot to chat in all channels.
- `BOT_NAME`: The name of the bot. This is used for the bot to recognize when it is mentioned in a message.
- `CHAT_MAX_LENGTH`: The maximum length of the chat history to store in Redis. This is used to limit the amount of memory used by the bot.
- `CTX`: The context length for the Ollama API. This determines how much of the chat history the bot will consider when generating a response.
Expand Down
1 change: 1 addition & 0 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ async def on_message(self, message):

string_channel_id = str(message.channel.id)

# If CHAT_CHANNEL_ID is set, only respond in that channel.
if self.chat_channel_id:
if string_channel_id != self.chat_channel_id:
return
Expand Down

0 comments on commit 985f416

Please sign in to comment.