ChatFilter
Summary
ChatFilter global table.
Functions
| Method | Returns |
|---|---|
| Clear() | void |
| ClearBlockedPhrases() | void |
| ClearBlockedRegex() | void |
| Enable() | void |
| Disable() | void |
| IsEnabled() | boolean |
| AddBlockedPhrase(phrase: string) | boolean |
| AddBlockedRegex(phrase: string) | boolean |
| SetFilterCharacter(char: string) | void |
| GetFilterCharacter() | string |
Functions
Clear
ChatFilter.Clear(): voidClears all blocked phrases & regex.
ClearBlockedPhrases
ChatFilter.ClearBlockedPhrases(): voidClears all blocked phrases.
ClearBlockedRegex
ChatFilter.ClearBlockedRegex(): voidClears all blocked regex.
Enable
ChatFilter.Enable(): voidEnable chat filter filtering messages. Note: Even when disabled, you can still access these table functions.
Disable
ChatFilter.Disable(): voidDisable chat filter filtering messages. Note: Even when disabled, you can still access these table functions.
IsEnabled
ChatFilter.IsEnabled(): booleanReturns if the chat filter is enabled.
Returns
| Type | Description |
|---|---|
| boolean |
AddBlockedPhrase
ChatFilter.AddBlockedPhrase(phrase: string): booleanAdd blocked phrase to chat filter. Filtering of this type is case insensitive. Returns whether the phrase was added to the list or already existed (false)
Parameters
| Name | Type | Description |
|---|---|---|
| phrase | string | The phrase you want to add |
Returns
| Type | Description |
|---|---|
| boolean |
AddBlockedRegex
ChatFilter.AddBlockedRegex(phrase: string): booleanAdd blocked regex to chat filter. Returns whether the regex was added to the list or already existed (false)
Parameters
| Name | Type | Description |
|---|---|---|
| phrase | string | The phrase you want to add |
Returns
| Type | Description |
|---|---|
| boolean |
SetFilterCharacter
ChatFilter.SetFilterCharacter(char: string): voidSets the chat filter's replacement character. For example, if set to '#', "blah badword" -> "blah #######"
Parameters
| Name | Type | Description |
|---|---|---|
| char | string | The character you want to set |
GetFilterCharacter
ChatFilter.GetFilterCharacter(): stringGets the chat filter's replacement character.
Returns
| Type | Description |
|---|---|
| string | character |