-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
35 lines (29 loc) · 846 Bytes
/
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
const Discord = require("discord.js");
const client = new Discord.Client();
require("dotenv").config({ path: "./.env" });
const topa = /t+h*o+p+[aeiou]/i;
const iva = /\bi+v+[aeiou]\b/;
const poruke = [
"https://www.wikihow.com/Overcome-Depression",
"https://www.webmd.com/depression/understanding-depression-prevention",
"https://www.drugs.com/comments/sertraline/",
];
client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}`);
});
client.on("message", (msg) => {
const content = msg.content;
var uvijet = false;
if (topa.test(content)){
if(msg.author.bot == false)
msg.channel.send(
`@X-Æ-A-293, \n ${poruke[Math.floor(Math.random() * poruke.length)]}`
);
}
if (iva.test(content)){
msg.channel.send(
`Topalovic? R.I.P.`
);
}
});
client.login(process.env.TOKEN);