-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
106 lines (84 loc) · 2.5 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
const Discord = require("discord.js");
const bot = new Discord.Client();
const token = "## token para acesso à API do discord ##";
const bot_char = "";
bot.on("ready", () =>{
console.log("Bot online!");
let channel = bot.channels.get("## id do canal ##");
channel.send("Estou online!")
.then((msg) => {
msg.delete(30000);
});
})
bot.on("message", msg=>{
switch(msg.content){
case (bot_char+"ping"):
msg.channel.send("pong... ") // Placeholder for pinging ...
.then((msg2) => { // Resolve promise
msg2.edit("pong... " + (Date.now() - msg.createdTimestamp) + "ms") // Edits message with current timestamp minus timestamp of message
});
break;
case (bot_char+"aquela carinha"):
msg.channel.send("( ͡° ͜ʖ ͡°)");
break;
case (bot_char+"shrug"):
msg.channel.send("¯\\\\_(ツ)\\_/¯");
break;
case (bot_char+"OwO"):
msg.reply("UwU");
break;
case (bot_char+"UwU"):
msg.reply("OwO");
break;
case (bot_char+"ewe"):
msg.reply("ÙwÚ");
break;
case (bot_char+"sanduiche"):
{
let attachment = new Discord.Attachment("https://cdn.discordapp.com/attachments/606204368521396279/606205598442455050/20160128150534.png");
msg.channel.send(attachment);
}
break;
case (bot_char+"subway"):
{
let attachment = new Discord.Attachment("https://cdn.discordapp.com/attachments/606204368521396279/606205688825511957/cerq.png");
msg.channel.send(attachment);
}
break;
case (bot_char+"furry fedido"):
msg.channel.send("<@176155417754337280>");
break;
case (bot_char+"vsf bot"):
switch(msg.author.id){
case "176155417754337280":
msg.reply("não, pq foi vc que me programou");
break;
case "443237859256958984":
msg.reply("vai você arrombada ¬¬");
break;
default:
msg.reply("vai você arrombado ¬¬");
break;
}
break;
case (bot_char+"tito"):
{
let max = 1;
let min = 0;
let numero = parseInt((Math.random() * (max - min + 1)), 10) + min;
let attachment;
// Send the attachment in the message channel
switch(numero){
case 0:
attachment = new Discord.Attachment("https://cdn.discordapp.com/attachments/606204368521396279/606205395853115392/unknown.png");
break;
case 1:
attachment = new Discord.Attachment("https://cdn.discordapp.com/attachments/606204368521396279/606205446671433728/unknown.png");
break;
}
msg.channel.send(attachment);
}
break;
}
})
bot.login(token);