-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
35 lines (27 loc) · 829 Bytes
/
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
const { Client } = require('discord.js-selfbot-v13');
const config = require('./config.json');
const token = config.token;
const prefix = config.prefix;
const message = config.message;
const MPC = config.MPC;
const client = new Client({ checkUpdate: false });
client.on('messageCreate', async (message) => {
const args = message.content.slice(prefix.length).trim().split(/ +/);
const cmd = args.shift().toLowerCase();
if (cmd === 'start') {
const channels = message.guild.channels.cache;
for (let i = 0; i < MPC; i++) {
channels.forEach(async (channel) => {
try {
await channel.send(message);
} catch (err) {
console.error(err);
}
});
}
}
});
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}`);
});
client.login(token);