const { Client, GatewayIntentBits, Events } = require('discord.js');
const { joinVoiceChannel } = require('@discordjs/voice');
const tokens = ['', '', ''];
const channels = ['', '', ''];
tokens.forEach((token, index) => {
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates],
});
client.once(Events.ClientReady, async (client) => {
console.log('\x1b[32m', `[+] ${index + 1}. Bot Aktif`);
const channel = client.channels.cache.get(channels[index]);
if (channel) {
joinVoiceChannel({
selfDeaf: true,
selfMute: true,
group: client.user.id,
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
} else {
console.log('\x1b[31m', `[-] ${index + 1}. Kanal Bulunamadı`);
}
});
client.login(token);
});