Skip to content

Trigger Type: RANDOM

Amy edited this page Dec 15, 2023 · 2 revisions

A RANDOM type response shares all the same fields and options as a TEXT response, but it picks a random response from a list rather than sticking to 1 predefined message.

Can use all Common Options

Example:

ExampleResponse:
  Type: RANDOM
  Responses: 
  - "This is the first response message!"
  - "This is the second response message!"
  - "This is the third response message!"
  Triggers:
  - "Helper bot test"
  - "Testing Helper Bot"
  Strict: false
  Reply: true
  Cooldown: 30

Fields

random types can have any of the following fields but at least 1 response and at least 1 Trigger is required.

Responses

The list of messages the bot sends when triggered, supports all Placeholders. Each response will have an equal chance of being picked.

ExampleResponse:
  Type: RANDOM
  Responses: 
  - "This is the first response message!"
  - "This is the second response message!"
  - "This is the third response message!"

Triggers

The message(s) a user can say to trigger the response.

ExampleResponse:
  Type: RANDOM
  Responses: 
  - "This is the first response message!"
  - "This is the second response message!"
  - "This is the third response message!"
  Triggers:
  - "This is a trigger"

Strict (True/False)

Defaults to false, a Strict trigger will require the full message to match rather than checking part of the message. For example, if you have "Apple" as a trigger word, a strict trigger will require a user to say "Apple" and nothing else, while a non-strict trigger will send the response even if the user says "I have an apple"

ExampleResponse:
  Type: RANDOM
  Responses: 
  - "This is the first response message!"
  - "This is the second response message!"
  - "This is the third response message!"
  Triggers:
  - "This is a trigger"
  Strict: true

Reply (True/False)

Defaults to false, if the response should be sent as a reply to the user who triggered it or not.

ExampleResponse:
  Type: RANDOM
  Responses: 
  - "This is the first response message!"
  - "This is the second response message!"
  - "This is the third response message!"
  Triggers:
  - "This is a trigger"
  Reply: true

Cooldown

Defaults to 0, A cooldown in seconds for how much time must pass before the trigger is triggered again.

ExampleResponse:
  Type: RANDOM
  Responses: 
  - "This is the first response message!"
  - "This is the second response message!"
  - "This is the third response message!"
  Triggers:
  - "This is a trigger"
  Cooldown: 30

Role

The ID of a role a user must have to trigger the response. Users without the role will not trigger the response.

ExampleResponse:
  Type: RANDOM
  Responses: 
  - "This is the first response message!"
  - "This is the second response message!"
  - "This is the third response message!"
  Triggers:
  - "This is a trigger"
  Role: 695804381215588392

MissingRole

The ID of a role a user must NOT have to trigger the response. Users with the role will not trigger the response.

ExampleResponse:
  Type: RANDOM
  Responses: 
  - "This is the first response message!"
  - "This is the second response message!"
  - "This is the third response message!"
  Triggers:
  - "This is a trigger"
  MissingRole: 695804381215588392

Example

This example has all options set on it.

ExampleResponse:
  Type: RANDOM
  Responses: 
  - "This is the first response message!"
  - "This is the second response message!"
  - "This is the third response message!"
  Triggers:
  - "Helper bot test"
  - "Testing Helper Bot"
  Strict: false
  Reply: true
  Cooldown: 30
  Role: 695804381215588392
  MissingRole: 808547514533019679