Auto deleting invite links / swear words

I have no clue how I would so this. But how can I ban certain words and links. But also making them all in one line of code instead of copying and pasting the code for one word and changing what word it auto deletes.

Hey @Krxvee,

You could group all the swear words into an array. And then

for (var i = 0; i < swearwords.length; i++) {
  if (message.content.includes(swearwords[i])) {
    // do whatever you want
    // for example:

Shorter would be:

message.content.includes(w => swears.some(e => e === w)) && message.delete()