You want your server to be clean? Use this system to delete messages with profanity.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const random = require("something-random-on-discord").ServerAssistant
/* Check the message content */
const checker = await random.checkProfanity(context.params.event.content)
/* if it do not include swear word then exit the process */
if(!checker.profanity) return;
/* Delete Message */
await lib.discord.channels['@0.1.1'].messages.destroy({
message_id: context.params.event.id,
channel_id: context.params.event.channel_id
});
/* Send the alert message */
return await lib.discord.channels['@0.1.1'].messages.create({
channel_id: context.params.event.channel_id,
content: `<@${context.params.event.author.id}> Please Do not use swear words :c`
});
//btw, here is the tutorial: https://www.youtube.com/watch?v=dQw4w9WgXcQ