This script is for PERSONAL use only!

You are free to install this script for yourself, but it is not allowed to be used wiki-wide (e.g., in MediaWiki:Common.js or MediaWiki:Wikia.js), as it would violate Fandom's Terms of Use.
(See the customization policy)

AutoMod automatically kicks and bans users if they post certain words in Chat.



This script has five customization options.

Name Description Default Type
ban.words Words to ban for, in lowercase. N/A Required
ban.reason The ban reason. Auto-Banned for Matching Anti-Spam Rules Optional
ban.duration The ban's duration, in seconds. 86400/1 day Optional
check Automatically enables script. false Optional
kick Words to kick for, in lowercase. N/A Required

In order for this script to work, you must specify what words the script should kick or ban for. You do not need to specify both (although you can), but at least one is necessary for the script to do anything. Make sure that the words are in lowercase. Here is an example configuration.

window.AutoMod = {
    ban: {
        words: ['yo'],
        reason: 'Violating Chat Policies',
        duration: 7200
    check: true,
    kick: ['hello', 'goodbye']


By default, this script does not go into action. This can be changed by checking the "Enable Auto Mod" box below the Chat textbox. It uses whatever configuration options you have specified while importing the script. These can be modified in real time using the two textboxes, one for kick words and one for ban. Separate each word with a comma.


v1.0 — October 2, 2018
TheGoldenPatrik1: Initial revision
v1.1 — October 2, 2018
TheGoldenPatrik1: Allow Updating and Disabling without Leaving Chat
v1.2 — January 9, 2019
TheGoldenPatrik1: Partial rewrite for optimization
v1.3 — January 22, 2019
TheGoldenPatrik1: Fix for using the default configuration
Text above can be found here (edit)
Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+