-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.js
32 lines (28 loc) · 1.1 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
// DISCORD MASS DM BOT ULTRA FAST V1
// THIS IS THE FASTEST MASS DM BOT OUT THERE
// PLEASE SUBSCRIVBE AND LIKE THE VIDEO.
const Discord = require('discord.js');
const { Id, token, prefix } = require('./config.json');
const Bot = new Discord.Client();({ws: { intents: new Discord.Intents(Discord.Intents.ALL) } });
Bot.on("ready", () => {
console.log(`READY !`);
});
Bot.on("message", message => {
if (message.content.startsWith(prefix + 'dm')) {
if (message.author.id != Id) {
return message.reply('Only Owner is Allowed to Use this Command')
}
else {
message.delete
args = message.content.split(" ").slice(1);
var argresult = args.join(' ');
message.guild.members.cache.forEach(member => {
member.send(argresult).then(console.log(`${member.user.username}#${member.user.discriminator}`))
.catch(err => console.error(`-----[DM's Disabled]----- \n${member.user.username}#${member.user.discriminator}`));
console.log(`.....DONE....`)
})
message.channel.send(`**DONE**`).then(message.delete({ timeout: 1000 }));
}
}
})
Bot.login(token);