-
Notifications
You must be signed in to change notification settings - Fork 2
/
SM84CEBot.js
59 lines (55 loc) · 2.48 KB
/
SM84CEBot.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//You need to store your bot into a variable.
var SM84CEbot = new Bot("SM84CEBot", "~");
function initializeBots() {
//call the "register" function of your bot, which tells the bot API, "I'm here! Send me commands plz!"
SM84CEbot.register();
}
//This is the function called whenever a message starts with the command header.
//set the 'executeCommand' function of your bot so that it, well, executes commands.
SM84CEbot.executeCommand = function (data) {
//This code initializes the variables:
var poster = data.poster;
var message = data.message;
var timestamp = data.timestamp;
var raw_timestamp = data.rawTimestamp;
if (message.startsWith("droneattack")) {
SM84CEbot.respond(poster + ": This is an attack of the Universal Paperclips drones. You'd better run!!");
}
if (message.startsWith("xd")) {
SM84CEbot.respond(poster + ": DoorsCS told me to tell you that xd is not an actual face. Stop it.");
}
if (message.startsWith("cookie")) {
SM84CEbot.respond("_iPhoenix_, LAX18, others: someone wanted you to have this cookie!");
}
if (message.startsWith("releasethehypnodrones")) {
SM84CEbot.respond(poster + ": Releasing the HypnoDrones...");
setTimeout(function () {
SM84CEbot.respond(poster + ": The HypnoDrones have been released! _iPhoenix_, are you ready to be turned into paperclips?");
}, 1000);
}
if (message.startsWith("installcycle")) {
SM84CEbot.respond(poster + ": Have you tried uninstalling and reinstalling?");
}
if (message.startsWith("powercycle")) {
SM84CEbot.respond(poster + ": DoorsCS told me to ask you if you've tried turning it off and back on again. He also wants you to look at this: https://youtu.be/nn2FB1P_Mn8");
}
if (message.startsWith("sm84ce")) {
SM84CEbot.respond("SM84CE: ping!");
}
if (message.substring(0, 4) == "ping") {
SM84CEbot.respond(poster + ": pong!");
}
if (message.substring(0,3) == "ban") {
SM84CEbot.respond("Don't make _iPhoenix_ ban you...")
}
if (message.substring(0,9) == "botattack") {
SM84CEbot.respond(poster + ": This is an attack of the UniChat Bots. RUUUN!!");
}
if (message.substring(0,9) == "banhammer") {
SM84CEbot.respond("------[#] :( ");
SM84CEbot.respond("uh oh... Someone's going to have a BAD day...");
}
if (message.substring(0,5) == "order") {
SM84CEbot.respond("ORDER! ORDER in the chatroom!! *"+poster+" bangs "+((poster == "SM84CE" || poster=="_iPhoenix_") ? "his " : "his/her ")+((poster == "_iPhoenix_")?"ban":"")+"hammer");
}
}