Untitled
unknown
plain_text
a year ago
1.1 kB
3
Indexable
module.exports = async (client, node) => { console.log(`[INFO] Node ${node.options.name} ready`); const guildDatas = await client.guildData.find(); const status = guildDatas.filter((x) => x.reconnect.status); console.log(`[INFO] Auto reconnect found in ${status.length} servers`); for (const guildData of guildDatas) { const index = guildDatas.indexOf(guildData); const reconnect = guildData.reconnect; setTimeout(async () => { const guild = client.guilds.cache.get(guildData.id); const text = client.channels.cache.get(reconnect.text); const voices = client.channels.cache.get(reconnect.voice); if (!reconnect.status || !text || !voices) return; await client.manager.create({ guildId: guild.id, voiceId: voices.id, textId: text.id, shardId: guild.shardId, volume: client.config.defaultVolume, deaf: true, }); }), index * 5000; } };
Editor is loading...
Leave a Comment