-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackup.txt
43 lines (35 loc) · 1.55 KB
/
backup.txt
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
const Discord = require('discord.js');
const { prefix, token } = require('./config.json');
const client = new Discord.Client();
client.once('ready', () => {
console.log('Ready!');
});
client.on('message', message => {
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(/ +/);
const command = args.shift().toLowerCase();
if (message.content.startsWith(`${prefix}ping`)) {
message.channel.send('Pong!');
}
else if (message.content.startsWith(`${prefix}beep`)) {
message.channel.send('Boop bitch');
}
else if (message.content.startsWith(`${prefix}server`)) {
message.channel.send(`This server's name is: ${message.guild.name}\nTotal members: ${message.guild.memberCount}`);
}
else if (message.content.startsWith(`${prefix}user-info`)) {
message.channel.send('Your username ' + message.author.username + '\nYour ID' + message.author.id);
}
else if (command === 'args-info') {
if (!args.length) {
return message.channel.send('You didnt specifiy any arguments' + message.author.name);
}
message.channel.send('Command name: ' + command + '\n Arguments: ' + args);
}
else if (command === 'kick') {
if (!message.mentions.users.size) return message.reply('You NEED to tag a user in order to kick them');
const taggedUser = message.mentions.users.first();
message.channel.send('You wanted to kick: ' + taggedUser.username);
}
});
client.login(token);