Maci is not exempt from this bot.
This commit is contained in:
parent
becd247715
commit
2e6943b678
14
main.cjs
14
main.cjs
@ -10,7 +10,7 @@ global.madlibState = { gameChannel: undefined, storyTitle:undefined, currentStor
|
|||||||
//Get number of stories
|
//Get number of stories
|
||||||
const madlib = require("./madlibs/stories.json");
|
const madlib = require("./madlibs/stories.json");
|
||||||
global.madlibState.numberOfStories = Object.keys(madlib.stories).length;
|
global.madlibState.numberOfStories = Object.keys(madlib.stories).length;
|
||||||
|
var triggeredByMaci = false;
|
||||||
global.tylerStop = function tylerStop(message) {
|
global.tylerStop = function tylerStop(message) {
|
||||||
if (!message.author.bot && message.author.id == "205475706296205312" && message.content.toLowerCase().includes('idiot')) {
|
if (!message.author.bot && message.author.id == "205475706296205312" && message.content.toLowerCase().includes('idiot')) {
|
||||||
message.react('<:amgery:1072270900675739758>');
|
message.react('<:amgery:1072270900675739758>');
|
||||||
@ -108,13 +108,19 @@ function matchAbbr(abbrTarget) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function replyMessage(message, correctedMessage, abbrsUsed) {
|
function replyMessage(message, correctedMessage, abbrsUsed) {
|
||||||
|
if (triggeredByMaci) {
|
||||||
|
var replyString = "Hi <@732679176565293156>! You're the reason why I exist! You can't stop me with just a role! >:D"
|
||||||
|
triggeredByMaci = false;
|
||||||
|
} else {
|
||||||
|
var replyString = "";
|
||||||
|
}
|
||||||
var plural = "";
|
var plural = "";
|
||||||
if (abbrsUsed == 1) {
|
if (abbrsUsed == 1) {
|
||||||
plural = "an acronym";
|
plural = "an acronym";
|
||||||
} else {
|
} else {
|
||||||
plural = abbrsUsed + " acronyms"
|
plural = abbrsUsed + " acronyms"
|
||||||
}
|
}
|
||||||
var replyString = "Your message contains " + plural + "! Let me fix that for you: \n"+ " \|\|btw I was written by Caleb Fontenot\|\| \n \n" + blockQuote(correctedMessage);
|
replyString += "Your message contains " + plural + "! Let me fix that for you: \n"+ " \|\|btw I was written by Caleb Fontenot\|\| \n \n" + blockQuote(correctedMessage);
|
||||||
var stringLength = replyString.length;
|
var stringLength = replyString.length;
|
||||||
|
|
||||||
if (stringLength > 2000) {
|
if (stringLength > 2000) {
|
||||||
@ -241,6 +247,10 @@ function checkIfExempt(message) {
|
|||||||
} else if (message.content.includes("```")) {
|
} else if (message.content.includes("```")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if(message.author.id == "732679176565293156") {
|
||||||
|
triggeredByMaci = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
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.member.roles.cache.some(role => role.name == "NoReactions")) {
|
if (!message.member.roles.cache.some(role => role.name == "NoReactions")) {
|
||||||
message.react('🇵');
|
message.react('🇵');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user