<commit_before>Many triggers have a default command (or commands) defined, so if you don't choose one in the options, the default will be used.

### Global options:
This is not settings for any one individual trigger; rather, these are options that can be used on *any* trigger. It is not always advisable to use them such, but they allow you to limit usage of commands to certain users, among other things:

| option | Type | Default | Description |
| :---: | :---: | :---: | :--------------------- |
| delay | number | | delay in ms between when the response is processed and when it's actually sent to the steam servers. |
| probability | *float* 0-1 | 1 | what is the likelyhood that the command will occur? Random number generated before any other checks must be less than this.|
| timeout | number | | how long in ms is a trigger disabled for before it can be used again. |
| respectsMute | bool | true | does the trigger respect muted status? That is, if the bot is muted, do we answer or not?|
| respectsGlobalFilters | bool | true | Should the trigger respect global ignores defined in the bot constructor? Used for e.g. logging a room where you don't want the bot to say anything, or globally ignoring a user while still logging them. There is a similar setting for triggers to use internally; at the time of this writing the only that uses the internal setting is logTrigger. |
| <s>respectsFilters</s> | bool | true | used internally only (ie, has no effect if you set it), to override filters (as defined below). Cannot be set (would be pointless) |
| ignore | ['steamid64', 'steamid64'] | | this filter is an array of steamid64s of users that this command will not work for, as well as groups this command cannot be used in. If a user or a groupchat matches any element, trigger will not be allowed to proceed. Overrides global filters. (If this is defined, global filters will be ignored)|
| user | ['steamid64', 'steamid64'] | | this filter is an array of whitelisted steamid64s of users that are allowed to use this command or groupchats that are allowed to use this command. If the steamid64 matches any elements, or if this array is not defined, trigger will be allowed to proceed (to the next filter, at least) |
| rooms | ['steamid64', 'steamid64'] | | this filter is an array of whitelisted steamid64s of groupchats for a trigger. If the steamid64 matches any elements, or if this array is not defined, trigger will be allowed to proceed (to the next filter, at least) |
| command | "!string" | see trigger | this isn't universal, however many triggers allow you to change the default command using this option. |
| allowMess... | *boolean* | false | allowMessageTriggerAfterResponse - If we trigger on a given line, should we pass the line down to more triggers or no? |

### `AcceptChatInviteTrigger`

Joins a specified chatroom when invited and says an optional welcome message. set option autoJoinAfterDisconnect to add channels to autojoin list when used.

Options:

- chatrooms = {"roomId1": "message1", "roomId1": "message1"} - list of rooms to join and their welcome message. If message is null, it will be replaced with defaultMessage; $inviter will be replaced with inviter's steamid64, $inviterurl with their profile url, and $invitername with their name/url.
- autoJoinAfterDisconnect = boolean - automatically rejoin chat after the bot reconnects or starts up again (unless it has been removed from chat since it was invited)
- joinAll = bool or array - set to 'true' to allow *anyone* to invite the bot to *any* chat. Set to false to only allow people to invite it to specified chats. Set to an array of users to only allow those users to invite the bot to all chats (anyone can still invite the bot to the chats specified)
- defaultMessage = string - used when a room's welcome message is set to null (not falsy, only null) or when joinAll is being used to allow joining unspecified chats. replaceable info is same as above.

### `AcceptFriendRequestTrigger`

Automatically accepts any friend requests sent to the bot.

### `AddFriendTrigger`

Tells the bot to add someone as a friend. You must input a steamid64.

Options:

- command - *string* - defaults to "!friend"

### `BanCheckTrigger`

Checks to see if a user has any VAC/economy/community bans via steam API. Requires a steam api key, defined as option apikey in the plugin, or globally defined as a chatBot option steamapikey

Options:

- command - *string* - defaults to "!********************************************************************"
- cacheTime - *int* - Message will not be sent if last join was within this much time, to reduce spam; Defaults to 1 hour (`3600000`). Set to -1 to disable onjoin checking.
- apikey - *string* - your steam API key. Define it globally in the bot constructor if you don't want to define it here, but you *need* this.
- onjoin - *boolean* or *object* - does it announce when someone joins a room with a ban? Set to true, false, or an array of chats to announce in.
- respectsMute - global option, defaults to false (this option defaults to true on most plugins)

### `BanTrigger`

Bans a user from a groupchat. User does not need to be in groupchat for this to work.

Options:

- command - *string* - defaults to "!ban"
- user - *array* of *string*s. Who can use this trigger

### `BotCommandTrigger`

Runs a specified callback when a specific command message is typed. It is preferred to write an actual trigger, but for simple things (e.g. muting, unmuting), this is easier.

Options:

- matches - *array* of case-insensitive *string*s - when to trigger the callback.
- exact - *boolean* - true to only trigger on an exact match, false to trigger on partial match
- callback - `function(bot,data){}` - function to call when a match is found. Data is optional and consists of {toId,fromId,message}.

### `ButtBotTrigger`

Repeats a message, but with one word randomly replaced with a specific other word. The canonical example is replacing a random word with "butt".

Options:

- replacement - *string* - the word to replace the random word with.
- probability - see global triggers.

### `ChatReplyTrigger`

Detects a message (either an exact match or a "contains" match) and replies with a specified message.

Options:

- matches - *array of strings* - messages that trigger the response
- responses - *array of strings* - the response will be a randomly selected string from this array
- exact - *boolean* - if this is true, the message received must be an exact match, if it's false the message just must contain the match (both case-insensitive)
- users - *array of string* - the steamIds of the users that can trigger a response, can be null or empty to match all users
- respond - *string* - where to respond? in 'group', 'pm', or nothing to respond wherever the command was sent (default)
- 
### `ChooseTrigger`

Adds the ability to make the bot make a choice when given various options. Each option is seperated via space.
Example: 
User: !choose Cats Dogs Hamsters Birds
Bot: I have chosen Birds

### `CleverbotTrigger`

Uses cleverbot to reply to a message, optionally only when a specific word is mentioned.
<commit_msg>Fixed Adding ChooseTrigger definition.<commit_after>Many triggers have a default command (or commands) defined, so if you don't choose one in the options, the default will be used.

### Global options:
This is not settings for any one individual trigger; rather, these are options that can be used on *any* trigger. It is not always advisable to use them such, but they allow you to limit usage of commands to certain users, among other things:

| option | Type | Default | Description |
| :---: | :---: | :---: | :--------------------- |
| delay | number | | delay in ms between when the response is processed and when it's actually sent to the steam servers. |
| probability | *float* 0-1 | 1 | what is the likelyhood that the command will occur? Random number generated before any other checks must be less than this.|
| timeout | number | | how long in ms is a trigger disabled for before it can be used again. |
| respectsMute | bool | true | does the trigger respect muted status? That is, if the bot is muted, do we answer or not?|
| respectsGlobalFilters | bool | true | Should the trigger respect global ignores defined in the bot constructor? Used for e.g. logging a room where you don't want the bot to say anything, or globally ignoring a user while still logging them. There is a similar setting for triggers to use internally; at the time of this writing the only that uses the internal setting is logTrigger. |
| <s>respectsFilters</s> | bool | true | used internally only (ie, has no effect if you set it), to override filters (as defined below). Cannot be set (would be pointless) |
| ignore | ['steamid64', 'steamid64'] | | this filter is an array of steamid64s of users that this command will not work for, as well as groups this command cannot be used in. If a user or a groupchat matches any element, trigger will not be allowed to proceed. Overrides global filters. (If this is defined, global filters will be ignored)|
| user | ['steamid64', 'steamid64'] | | this filter is an array of whitelisted steamid64s of users that are allowed to use this command or groupchats that are allowed to use this command. If the steamid64 matches any elements, or if this array is not defined, trigger will be allowed to proceed (to the next filter, at least) |
| rooms | ['steamid64', 'steamid64'] | | this filter is an array of whitelisted steamid64s of groupchats for a trigger. If the steamid64 matches any elements, or if this array is not defined, trigger will be allowed to proceed (to the next filter, at least) |
| command | "!string" | see trigger | this isn't universal, however many triggers allow you to change the default command using this option. |
| allowMess... | *boolean* | false | allowMessageTriggerAfterResponse - If we trigger on a given line, should we pass the line down to more triggers or no? |

### `AcceptChatInviteTrigger`

Joins a specified chatroom when invited and says an optional welcome message. set option autoJoinAfterDisconnect to add channels to autojoin list when used.

Options:

- chatrooms = {"roomId1": "message1", "roomId1": "message1"} - list of rooms to join and their welcome message. If message is null, it will be replaced with defaultMessage; $inviter will be replaced with inviter's steamid64, $inviterurl with their profile url, and $invitername with their name/url.
- autoJoinAfterDisconnect = boolean - automatically rejoin chat after the bot reconnects or starts up again (unless it has been removed from chat since it was invited)
- joinAll = bool or array - set to 'true' to allow *anyone* to invite the bot to *any* chat. Set to false to only allow people to invite it to specified chats. Set to an array of users to only allow those users to invite the bot to all chats (anyone can still invite the bot to the chats specified)
- defaultMessage = string - used when a room's welcome message is set to null (not falsy, only null) or when joinAll is being used to allow joining unspecified chats. replaceable info is same as above.

### `AcceptFriendRequestTrigger`

Automatically accepts any friend requests sent to the bot.

### `AddFriendTrigger`

Tells the bot to add someone as a friend. You must input a steamid64.

Options:

- command - *string* - defaults to "!friend"

### `BanCheckTrigger`

Checks to see if a user has any VAC/economy/community bans via steam API. Requires a steam api key, defined as option apikey in the plugin, or globally defined as a chatBot option steamapikey

Options:

- command - *string* - defaults to "!********************************************************************"
- cacheTime - *int* - Message will not be sent if last join was within this much time, to reduce spam; Defaults to 1 hour (`3600000`). Set to -1 to disable onjoin checking.
- apikey - *string* - your steam API key. Define it globally in the bot constructor if you don't want to define it here, but you *need* this.
- onjoin - *boolean* or *object* - does it announce when someone joins a room with a ban? Set to true, false, or an array of chats to announce in.
- respectsMute - global option, defaults to false (this option defaults to true on most plugins)

### `BanTrigger`

Bans a user from a groupchat. User does not need to be in groupchat for this to work.

Options:

- command - *string* - defaults to "!ban"
- user - *array* of *string*s. Who can use this trigger

### `BotCommandTrigger`

Runs a specified callback when a specific command message is typed. It is preferred to write an actual trigger, but for simple things (e.g. muting, unmuting), this is easier.

Options:

- matches - *array* of case-insensitive *string*s - when to trigger the callback.
- exact - *boolean* - true to only trigger on an exact match, false to trigger on partial match
- callback - `function(bot,data){}` - function to call when a match is found. Data is optional and consists of {toId,fromId,message}.

### `ButtBotTrigger`

Repeats a message, but with one word randomly replaced with a specific other word. The canonical example is replacing a random word with "butt".

Options:

- replacement - *string* - the word to replace the random word with.
- probability - see global triggers.

### `ChatReplyTrigger`

Detects a message (either an exact match or a "contains" match) and replies with a specified message.

Options:

- matches - *array of strings* - messages that trigger the response
- responses - *array of strings* - the response will be a randomly selected string from this array
- exact - *boolean* - if this is true, the message received must be an exact match, if it's false the message just must contain the match (both case-insensitive)
- users - *array of string* - the steamIds of the users that can trigger a response, can be null or empty to match all users
- respond - *string* - where to respond? in 'group', 'pm', or nothing to respond wherever the command was sent (default)
- 
### `ChooseTrigger`
 
Chooses a random item from a list supplied.
 
Options:
- command (string) - defaults to "!choose"

### `CleverbotTrigger`

Uses cleverbot to reply to a message, optionally only when a specific word is mentioned.

{'fraction_non_alphanumeric': 0.08206708213710524, 'fraction_numerical': 0.005881941040543379, 'mean_word_length': 4.021800281293952, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6556082', 'n_tokens_mistral': 3774, 'n_tokens_neox': 3626, 'n_words': 2175}