Delete message if message contains the word 'block' and 'bot'
This commit is contained in:
parent
7ec0366062
commit
e970da013d
8
main.cjs
8
main.cjs
@ -266,6 +266,10 @@ function checkIfExempt(message) {
|
|||||||
|
|
||||||
function checkInsult(message) {
|
function checkInsult(message) {
|
||||||
if (!message.author.bot) {
|
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.member.roles.cache.some(role => role.name == "Exempt from NoMoreAcronyms")) {
|
||||||
if (message.content.includes("bot", "annoying")) {
|
if (message.content.includes("bot", "annoying")) {
|
||||||
message.react('🇳');
|
message.react('🇳');
|
||||||
@ -278,6 +282,8 @@ function checkInsult(message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Madlib game logic
|
// Madlib game logic
|
||||||
|
|
||||||
// Setup story
|
// Setup story
|
||||||
@ -362,4 +368,4 @@ function endMadlib() {
|
|||||||
channel.send("Story is complete! \n" + currentStory);
|
channel.send("Story is complete! \n" + currentStory);
|
||||||
//Reset madlibState.
|
//Reset madlibState.
|
||||||
global.madlibState = { gameChannel: undefined, storyTitle:undefined, currentStory: undefined, storyIterate: 0, storyReplaceContent: [], storyLength: undefined};
|
global.madlibState = { gameChannel: undefined, storyTitle:undefined, currentStory: undefined, storyIterate: 0, storyReplaceContent: [], storyLength: undefined};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user