aboutsummaryrefslogtreecommitdiff
path: root/aleemod.js
diff options
context:
space:
mode:
authorAlee14 <Alee14498@gmail.com>2017-05-31 18:54:22 -0400
committerGitHub <noreply@github.com>2017-05-31 18:54:22 -0400
commitc9504a1db35dc160a3ab0d3a47c2a230b33caf25 (patch)
tree73924f3ff2cd26726544c7c89eca731890bc7cc9 /aleemod.js
parentd6ad28b5269930264d1d0135c17e51b1a7a0c6fe (diff)
downloadAleeBot-c9504a1db35dc160a3ab0d3a47c2a230b33caf25.tar.gz
AleeBot-c9504a1db35dc160a3ab0d3a47c2a230b33caf25.tar.bz2
AleeBot-c9504a1db35dc160a3ab0d3a47c2a230b33caf25.zip
Update aleemod.js
Diffstat (limited to 'aleemod.js')
-rw-r--r--aleemod.js31
1 files changed, 30 insertions, 1 deletions
diff --git a/aleemod.js b/aleemod.js
index e059bd9..efea3b5 100644
--- a/aleemod.js
+++ b/aleemod.js
@@ -70,7 +70,36 @@ const Discord = require('discord.js');
return;
}
}
-
+
+ //No Caps
+ if (msg.match(/[A-Z]/gm) != null && msg.match(/[A-Z]/gm).length > (parseFloat(msg.length) * 0.8)) {
+ console.log("[FILTER] Caps caught from " + getUserString(message.author));
+ switch (Math.floor(Math.random() * 1000) % 6) {
+ case 0:
+ message.reply("Shh...");
+ break;
+ case 1:
+ message.reply("The community likes peace and quiet.");
+ break;
+ case 2:
+ message.reply("Isn't it weird when you're reading... and then you see a bunch of caps?");
+ break;
+ case 3:
+ message.reply("If you're going to type that, why not get out a pen and paper and do it yourself or shout in your head please!");
+ break;
+ case 4:
+ message.reply("DON'T SHOUT IN HERE K THIS IS ME :angry:");
+ break;
+ case 5:
+ message.reply("Whoa whoa, slow down, my friend! No need for raised voices!");
+ break;
+ }
+ message.delete();
+ return;
+ }
+ }
+ }
+
//Spam limiting
if (lastMessages[message.author.id] != msg) {