-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.js
More file actions
60 lines (38 loc) · 1.53 KB
/
main.js
File metadata and controls
60 lines (38 loc) · 1.53 KB
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
const keepAlive = require("./server.js")
const Discord = require('discord.js');
const client = new Discord.Client();
const randomstring = require("randomstring");
const prefix = '!';
client.on('message', msg => {
let args = msg.content.slice(prefix.length).trim().split(' ');
if (msg.content.startsWith(`${prefix}setup`)) {
if (!msg.guild.member(client.user).hasPermission(["MANAGE_CHANNELS", "ADMINISTRATOR"])) return;
msg.guild.channels.create(`mining`, 'text').catch(e => { });
}
if (msg.content.startsWith(`${prefix}gen`)) {
msg.delete()
msg.channel.send("https://discord.gift/" + randomstring.generate(16));
}
if (msg.content.startsWith(`${prefix}start`)) {
if (!msg.guild.member(client.user).hasPermission(["ADMINISTRATOR"])) return;
msg.delete()
var interval = setInterval(function () {
msg.channel.send("https://discord.gift/" + randomstring.generate(16));
}, 2000);
}
});
keepAlive()
client.on('ready', async () => {
console.log('lets mine!')
let statuses = [
`||Created By: Professor Puddle||\n||Support Server: vKS3nPkaKx||`,
]
setInterval(function () {
let status = statuses[Math.floor(Math.random() * statuses.length)];
client.user.setActivity(status, {
type: "PLAYING",
url: "https://www.twitch.tv/real_twitcher"
})
}, 4000)
})
client.login('OTE1NDczOTcxMTgzNTA1NTA4.YacHkw.S_mJ_DG-cPc-mma3bFSvpbX_P-U')