# Configuration

## General configuration

```yaml
# Displayname of the bot
botname: "<gradient:#E9C113:#E99E13>PS ChatBot</gradient>"

# Key words to listen - Case insensitive
key-words:
- "ChatBot"
- "help"

# Format of the bot responses, DO NOT USE COLORS HERE, for colors use botname or ai_messages_format
format: "{botname}: {message}"
# AI messages format:
ai_messages_format: "<gray>{message}</gray>"

# Convert MiniMessage to CMI Chat
convert_to_cmi: false

# Should the bot send a message when a player joins the server?
message_on_join: true
# Message to send when a player joins the server
message_to_send: "<gray>Hello! i'm {botname}."
```

`botname` : The displayname of the bot, you can use MiniMessage for colors.

`key-words` : List of words that will trigger a bot response, in the example the bot will only answer a question if it contains the words "chatbot" or "help". Case insensitive.

`format` : Order of the displayname and the message content.

`ai_message_format:` The color of the response of the bot, use minimessage for colors.

`convert_to_cmi` : If you are using CMI Chat, set it to "true".

`message_on_join` : The bot will send a message to a player when joins

`message_to_send` : The message to send, if `message_on_join` is true.



## AI Configuration

```yaml
# AI API Key
# If you don't have one, ask for it in the discord server.
api-key: ""
provider: "google" # Can be "google" or "openrouter"

# Response delay
response-delay: 1000 # In milliseconds

# Response lenght limit
max-response-lenght: 300

# Context to use in the prompt
context:
  style: "Friendly" # Can be "Friendly", "Professional" or "Casual"
  server_name: "Minecraft Server" # Name of the server
  server_version: "1.21.4" # Version of the server
  public_server: true # Is the server public?
  server_type: "JAVA" # Can be "JAVA" or "GEYSERMC"
  # TIP: Give key words in CAPS and responses to make the bot more personal
  # Example:
  # - "For get SERVER IP: Use /ip"
  custom-context:
  - "HOW TO GO TO THE SPAWN: Use /spawn "

# List of players to ignore
ignore-players: []

# Filters, to avoid the bot to answer to some messages
# Keep in mind that the bot will have the same filters as the original ai model
filters:
  ignore-prompts:
    ignore_code_prompts: false # Ignore code prompts
    # Ignore keywords, case insensitive
    ignore_keywords:
    - "apple"
  filtered_message: "Sorry, i can't answer that." # Message to send when the bot is filtered

response_language: "auto" # Language of the bot responses, can be "es", "en" or "auto"
```

`api-key` : Your Openrouter or Google AI API Key, you can ask on the discord server how to get one. When changing this option, restart the server.

`provider` : If your AI API Key is google, or openrouter.

`response-delay` : How many miliseconds will the bot wait for a response, a delay is recommended for best user experience.

`max-response-length` : How many characters should the response have at max.

`context` : In this category, you can give the AI information about your server to get the best responses.

`ignore-players` : Players in this list will not be able to get bot responses.

`filters` : Content the bot will ignore for safety reasons, customizable

`response_language` : The language of the bot responses, "auto" recommended.
