From e970da013de0d7670651d693721f44d469bdd7f4 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Mon, 6 Nov 2023 12:32:22 -0600 Subject: [PATCH] Delete message if message contains the word 'block' and 'bot' --- main.cjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.cjs b/main.cjs index 1c2c3db..4d6f9a0 100644 --- a/main.cjs +++ b/main.cjs @@ -266,6 +266,10 @@ function checkIfExempt(message) { function checkInsult(message) { if (!message.author.bot) { + if (message.content.includes("bot", "block")) { + message.delete(); + } + if (!message.member.roles.cache.some(role => role.name == "Exempt from NoMoreAcronyms")) { if (message.content.includes("bot", "annoying")) { message.react('🇳'); @@ -278,6 +282,8 @@ function checkInsult(message) { } + + // Madlib game logic // Setup story @@ -362,4 +368,4 @@ function endMadlib() { channel.send("Story is complete! \n" + currentStory); //Reset madlibState. global.madlibState = { gameChannel: undefined, storyTitle:undefined, currentStory: undefined, storyIterate: 0, storyReplaceContent: [], storyLength: undefined}; -} \ No newline at end of file +}