Basic Discord Moderator Bot
This is basic yet fully customizable Discord moderator Bot that deletes messages
in channels that contain banned words that you define.
It's a great starting point to add automatic moderator functionality starting from
removing unwanted messages and can be extended to banning or kicking certain members
or other actions you deem appropriate.
How It Works
Evertime a message is sent in a channel, the functions/events/discord/message/create.js
endpoint gets called.
That would then check the contents of the message if it contains any of the banned words
from the BANNED_WORDS
list using regular expressions. If it does, then the message gets deleted from the channel
by calling the discord.channels.messages.destroy
API and passing in the message and channel IDs.
Extending This App
If you want to change the banned words or add more complex functionality to your
moderator bot feel free to edit the code for this app after installation.
Update the BANNED_WORDS
variable and add more custom logic to your moderator bot.
Learn more
If you are interested in learning more about bot building, click here to follow our guide on building Discord bots!
Thank You!
If you have any questions or feedback, please join our community Discord guild
from the Docs tab in the top bar. You can also follow us on Twitter, @AutocodeHQ.