-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
150 lines (135 loc) · 4.82 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
149
150
const Discord = require('discord.js');
const client = new Discord.Client();
require('discord-buttons')(client);
require('./buttons')(client);
const WOKCommands = require('wokcommands');
const { color, prefix, token } = require("./config.js");
const {pycolor} = require("./config");
const version = "v.1.3.2"
const activities_list = [
"dev help | "+version,
"</> by JuSoft",
"with Discord Assistant",
"with ModMail",
"dev py",
"PyCharm",
"WebStorm",
"jusoft.dev",
"dev help",
version,
"made with discordjs",
"dev py",
"invert binary tree",
"Error 404 :>",
"nothing"
];
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
setInterval(() => {
const index = Math.floor(Math.random() * (activities_list.length - 1) + 1); // generates a random number between 1 and the length of the activities array list (in this case 5).
client.user.setActivity(activities_list[index], { type: 'PLAYING' }); // sets bot's activities to one of the phrases in the arraylist.
}, 10000); // Runs this every 10 seconds.
});
/*client.on('message', msg => {
if (msg.content === prefix + 'ping') {
msg.reply('Pong!');
}
});*/
client.on('ready', () => {
const wok = new WOKCommands(client, {
commandsDir: 'commands',
featuresDir: 'events',
showWarns: false,
del: -1,
defaultLanguage: "english",
ignoreBots: true,
testServers: ['828176463597404161'],
disabledDefaultCommands: [
'help',
'command',
'language',
'prefix',
'requiredrole'
]
})
.setDefaultPrefix(prefix)
.setColor
})
client.on("message", async (message) => {
if (message.content === (prefix + "help")) {
const embprefix = 'dev'
const embed1 = new Discord.MessageEmbed()
embed1.setTitle("Commands for " + client.user.username)
embed1.setColor(pycolor)
embed1.setFooter('1/2')
embed1.setTimestamp()
embed1.addFields(
{
name: "<:github:858434402307538984> GitHub",
value: `┕\`${embprefix} github\``,
inline: true,
},
{
name: "<:bot:872774084331712512> Invite",
value: `┕\`${embprefix} invite\``,
inline: true,
})
embed1.addFields(
{
name: "<:info:858603728441180170> Ping",
value: `┕\`${embprefix} ping\``,
inline: true,
},
{
name: "<:connection:866000655307374623> Statistics",
value: `┕\`${embprefix} stats\``,
inline: true,
},
{
name: "<:plus:858599381943058442> Suggestions",
value: `┕\`${embprefix} suggest\``,
inline: true,
})
const embed2 = new Discord.MessageEmbed()
embed2.setTitle("Commands for " + client.user.username)
embed2.setColor(pycolor)
embed2.setFooter('2/2')
embed2.setTimestamp()
embed2.addFields(
{
name: "<:python:794178270211342346> Python Documentation",
value: `┕\`${embprefix} py\``,
inline: true,
},
{
name: "<:git:873471940818526209> Git Documentation",
value: `┕\`Coming soon\``,
inline: true,
},
{
name: "<:js:873470844817514507> JavaScript Documentation",
value: `┕\`Coming soon\``,
inline: true,
})
embed2.addFields({
name: "<:html:873471941179232266> HTML Documentation",
value: `┕\`Coming soon\``,
inline: true,
},
{
name: "<:css:873471941229568050> CSS Documentation",
value: `┕\`Coming soon\``,
inline: true,
},
{
name: "<:go:873471941409906728> Go Documentation",
value: `┕\`Coming soon\``,
inline: true,
})
message.channel.createSlider(message.author.id, [embed1, embed2]);
}
});
client.on('guildCreate', guild => {
guild.systemChannel.send("https://i.imgur.com/z3wU2tF.png")
});
client.login(token);