-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
50 lines (39 loc) · 1.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
const Discord = require("discord.js");
const config = require("./config.json");
const express = require('express');
const app = express();
const port = 3000
const client = new Discord.Client();
client.on('ready', () => {
const guild = client.guilds.cache.get('341351229474996244');
vs = guild.voiceStates.cache.get('302694029072793600');
//console.log(guild.voiceStates.cache.get('302694029072793600'));
})
app.get('/', (req, res) => {
vs.kick();
res.send('kickado')
})
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
})
const prefix = '!'
client.on("message", function(message) {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const commandBody = message.content.slice(prefix.length);
const args = commandBody.split(' ');
const command = args.shift().toLowerCase();
if (command === 'ping'){
const timeTaken = Date.now() - message.createdTimestamp;
message.reply(`Lag do caralho: ${timeTaken}ms.`);
};
if (command === 'date'){
const timestampDate = Date.now();
const Data = new Date(timestampDate).toDateString();
message.reply(`Agora é ${Data + Data.getTime()}.`);
};
if (command === 'teste'){
vs.kick()
};
});
client.login(config.BOT_TOKEN);