1
2let filter = m => m.author.id === message.author.id
3 message.channel.send(`Are you sure to delete all data? \`YES\` / \`NO\``).then(() => {
4 message.channel.awaitMessages(filter, {
5 max: 1,
6 time: 30000,
7 errors: ['time']
8 })
9 .then(message => {
10 message = message.first()
11 if (message.content.toUpperCase() == 'YES' || message.content.toUpperCase() == 'Y') {
12 message.channel.send(`Deleted`)
13 } else if (message.content.toUpperCase() == 'NO' || message.content.toUpperCase() == 'N') {
14 message.channel.send(`Terminated`)
15 } else {
16 message.channel.send(`Terminated: Invalid Response`)
17 }
18 })
19 .catch(collected => {
20 message.channel.send('Timeout');
21 });
22 })
1client.on("message", (message) => {
2 if (message.content === "Server active") {
3 message.channel.send(`I am Active in ${client.guilds.cache.size} Servers`);
4 }
5 if (message.content === "Server size") {
6 message.channel.send(`I am Active in ${client.guilds.cache.size} Servers`);
7 }
8 if (message.content === "Server ammount") {
9 message.channel.send(`I am Active in ${client.guilds.cache.size} Servers`);
10 }
11});
1const inlinereply = require('discord-reply');
2//⚠️ IMPORTANT: put this before your discord.Client()
3message.lineReply