Skip to content
Kalbintion Kier edited this page Sep 24, 2016 · 6 revisions

filters is a core command found within Kdkbot. Filters are ways to handle chat messages automatically that may not be command based. This is useful for automatically purging people under the age of 18, banning sensitive words, warning, etc.

Syntax

filter <<new> <type> <name> <regex> | <remove> (<index> | <name>) | <view> (<index> | <name>) <value> | <edit> (<index> | <name>) <value> <new_value> | <save> | <reload> | <size>

Since the above can be a bit annoying to decipher, the syntax for each sub-command is as follows:

  • filter new <type> <name> <regex>
  • filter remove (<index> | <name>)
  • filter view (<index> | <name>) <value>
  • filter edit (<index> | <name>) <value> <new value>
  • filter save
  • filter reload
  • filter ;size

New

filter new will create a new filter with a given human readable name with type type (See Type for more information) and regular expression (regex).

Remove

filter remove will remove an already created filter with a given name or index.

View

filter view will show the information of a filter with the given name or index for the given value (See Value for more information)

Edit

filter edit will edit the information of a filter with the given name or index for the given value with the new value

Save

filter save has not yet been implemented but will manually save the filter list. This is done automatically and should not be needed.

Reload

filter reload has not yet been implemented but will manually reload the filter list. This is initially loaded on bot startup and shouldnt be necessary.

Size

filter size will return the total number of filters for the channel.

Type

There are certain _type_s of filters. These types are specified by using a number or a word.

  • 0 OR none - Will do nothing if the filter is hit. This is useful for storing an inactive filter if its needed later on.
  • 1 OR purge - Will purge a users chat from the channel. Note: This requires the bot to have chat moderator
  • 2 OR timeout - Will timeout a user from the channel for the default 10 minutes. Note: This requires the bot to have chat moderator.
  • 3 OR ban - Will ban user from the channel. Note: This requires the bot to have chat moderator.
  • 4 OR message - Similar to none, but will send a message to the channel if this filter type is triggered.

Value

The value for filters are as follows:

  • type - Shows the type (See above section)
  • regex - Shows the regular expression
  • info - Shows the message associated with a filter. All filters can have a message associated with it, however it will not send one without being of Type message

Clone this wiki locally