-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
148 lines (123 loc) · 5.32 KB
/
index.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
require('dotenv').config();
const { Client, Intents, Collection } = require('discord.js');
const bot = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });
bot.commands = new Collection();
const botCommands = require('./commands');
Object.keys(botCommands).map(key => {
bot.commands.set(botCommands[key].name, botCommands[key]);
});
const TOKEN = process.env.DISCORD_TOKEN;
bot.login(TOKEN);
bot.on('ready', () => {
console.info(`Logged in as ${bot.user.tag}!`);
bot.user.setActivity(".help")
});
let angry = false;
let baduser;
bot.on('message', msg => {
BarbPersonality(msg);
if (msg.content.charAt(0) == '.') {
const args = msg.content.slice(process.env.PREFIX.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
if (angry) {
let user = bot.users.cache.get(baduser);
msg.reply("When " + user.username + " apoligizes ill come back");
return;
}
CharacterResponses(msg, command);
if (!bot.commands.has(command)) {
return;
};
console.info(`Called command: ${command}`);
try {
let value = bot.commands.get(command).execute(msg, args, botCommands);
if (value && !angry) {
angry = true;
baduser = msg.author.id;
}
} catch (error) {
console.error(error);
msg.reply('there was an error trying to execute that command!');
}
}
else {}
});
function BarbPersonality(msg) {
if ((msg.content.toLowerCase() == "im sorry" || msg.content.toLowerCase() == "i'm sorry" || msg.content.toLowerCase() == "i'm sorry." || msg.content.toLowerCase() == "im sorry.") && angry && msg.guild.members.cache.get(msg.author.id) == baduser) {
console.log(angry)
console.log(msg.guild.members.cache.get(msg.author.id) == baduser)
angry = false;
baduser = null;
msg.reply("Thank you, im sorry for snapping, things just get really overwheming sometimes");
}
if (msg.content.toLowerCase() == "we love you barb" || msg.content.toLowerCase() == "i love barb" || msg.content.toLowerCase() == "i love barb." || msg.content.toLowerCase() == "we love you barb." || msg.content.toLowerCase() == "i love you barb" ) {
msg.reply("Thank you!! I love you too!");
}
}
function CharacterResponses(msg, command) {
if (command.toLowerCase() == "grigori") {
msg.reply("Come back with whiskey or dont come back");
} else if (command.toLowerCase() == "saeval") {
msg.reply("Got any secrets?");
} else if (command.toLowerCase() == "holtz") {
msg.reply("DEMOCRACYYYYYYYYYYYY!!");
} else if (command.toLowerCase() == "nine") {
msg.reply("Nine isnt home right now, please leave a message after the beep");
} else if (command.toLowerCase() == "anguillo") {
msg.reply(":anguillocat: *gay judgment* :anguillocat: ");
} else if (command.toLowerCase() == "emile") {
msg.reply("Caw caw motherfucker");
} else if (command.toLowerCase() == "seagull") {
msg.reply("Hi Seagull, im Sean!");
} else if (command.toLowerCase() == "lovejoy") {
var rand = Math.floor(Math.random() * 2)
if (rand == 1) {
msg.reply("Keep your eyes shut and remember");
} else if (rand == 0) {
msg.reply(":sparkling_heart: War & Peace :sparkling_heart:");
}
} else if (command.toLowerCase() == "baruke") {
msg.reply("<:hornyLovejoy:992238540324872262>");
} else if (command.toLowerCase() == "beckon") {
msg.reply(":handshake: It is a pleasure to make your acquaintance");
} else if (command.toLowerCase() == "hermia") {
var rand = Math.floor(Math.random() * 2)
if (rand == 1) {
msg.reply("FIGHT or DIE");
} else if (rand == 0) {
msg.reply("HELLOOOOO NURSE!!");
}
} else if (command.toLowerCase() == "jackie") {
msg.reply("WE ARE THE TIDE");
} else if (command.toLowerCase() == "berthold") {
msg.reply("Please not the accounts, no hands OFF that ledger!!");
} else if (command.toLowerCase() == "daeafae") {
msg.reply("Mischief and chaos = fun times");
} else if (command.toLowerCase() == "nurse") {
msg.channel.send("<@254782820017242124>")
} else if (command.toLowerCase() == "rachel") {
msg.reply(":raccoon:");
} else if (command.toLowerCase() == "lorna") {
msg.reply("Damn, you *really* pissed off your Emissary, its literally flipping you off right now");
} else if (command.toLowerCase() == "melody") {
msg.reply("You humans *must* really enjoy this dying thing, its ***so*** hard to stay in character!");
} else if (command.toLowerCase() == "molly") {
msg.reply("Did you hear?!?! I killed a ***DRAGON***!!!");
} else if (command.toLowerCase() == "alastair") {
var rand = Math.floor(Math.random() * 2)
if (rand == 1) {
msg.reply("What is the *point* of doing a thing if you cant do it with some flair? Sounds downright boring");
} else if (rand == 0) {
msg.reply("A is for Awesome \nL is for lovely \nA is now for Amazing\nS is for simply brilliant\nT is for... tremendously charming\nA is for... awesomer?\nI is for...\n\nYou know what, you get the point.");
}
} else if (command.toLowerCase() == "jasper") {
var rand = Math.floor(Math.random() * 2)
if (rand == 1) {
msg.reply("The DEFINITION of 'If looks could kill'");
} else if (rand == 0) {
msg.reply("#gothbirdboy");
}
} else if (command.toLowerCase() == "eleanor") {
msg.reply("You DARE impugn MY ***HONOR***?!?!");
}
}