> For the complete documentation index, see [llms.txt](https://wiki.stmod.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.stmod.net/official-servers/chatting.md).

# Chatting

<figure><img src="https://1662484209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSrVu0j9CYXbvJXRYgHnk%2Fuploads%2Fgit-blob-536582beec78d1e6212172722e38ef4df3b3a76a%2Fchatting-tab-main.png?alt=media" alt="Chatting tab"><figcaption><p>Chatting tab (build v250926) — identical on Private Servers and Official servers</p></figcaption></figure>

* **Text field** — Enter the text you want to spam.
* **Delete** — Clear your current text.
* **Delay** — Set how frequently (in seconds) your message will be sent.
* **Color** — Choose the color your spammed text will appear in.
* **Type** — Select the chat channel to send your message through:
  * Chat
  * Shout
  * PM
  * Merchant *(not available on all servers)*
* **Start** / **Stop** — Starts or stops the repeating spam.
* **Send text once** — Sends the current text a single time without starting the repeating loop.

***

**`Chatting tab → Auto-Reply`**

<figure><img src="https://1662484209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSrVu0j9CYXbvJXRYgHnk%2Fuploads%2Fgit-blob-105f86815aa07d64b4c75b3509f0c26e25e97e8a%2Fchatting-auto-reply.png?alt=media" alt="Auto-Reply sub-tab"><figcaption></figcaption></figure>

* **If word / phrase below found** — Enter the keyword or phrase the bot should watch for in incoming messages.
* **Reply with** — The message the bot will send when a match is found.

  Example: if you set the trigger to `hello` and the reply to `hi`, the exchange will look like this:

  ```
  PlayerX: hello
  STMod: hi
  ```
* **Add answer** — Adds the trigger/reply pair you just typed to the **Current replies list**.
* **Enable auto-reply bot** — Turns the auto-reply bot on or off.
* **Reply back in x seconds** — How long (in seconds) the bot waits before sending its reply.
* **Reply times** — Limits how many times the bot will reply to the same message/sender, to avoid loops with other bots.
* **AI reply** — Instead of (or alongside) your keyword list, lets an AI model generate the reply text based on the incoming message.

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>AI reply needs your own Groq API key. The first time you enable it, STMod will offer to open <code>STMod/Data/groq_api_key.txt</code> so you can paste your key in — get a free key from <a href="https://console.groq.com/">Groq's console</a> and save it into that file. STMod does not provide this key for you.</p></div>
* **Current replies list** — Displays all of your currently configured trigger/reply pairs. Use **Delete** to remove a selected entry.
* **Reply with '?' if unknown message** — The bot replies with `??` when it receives a message that does not match any entry in your reply list.

  Example — reply list:

  ```
  abc:bca
  hey:hi
  ```

  ```
  PlayerX: hi there
  STMod: ??
  ```
* **Repeat previous message if unknown message** — The bot echoes back the last received message when no match is found in your reply list.

  Example — reply list:

  ```
  abc:bca
  hey:hi
  ```

  ```
  PlayerX: hi there
  STMod: hi there
  ```
