This commit is contained in:
Christopher Cookman 2024-05-16 21:13:31 -06:00
parent 69ab79e930
commit 9c1703d1ae
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -943,20 +943,16 @@ discord.on("interactionCreate", async (interaction) => {
await interaction.deferReply({ ephemeral: true })
var category;
// Create channels for all rooms
const chunks = [];
const chunkSize = 50;
// const totalRooms = iem.length;
// for (let i = 0; i < totalRooms; i += chunkSize) {
// chunks.push(iem.slice(i, i + chunkSize));
// }
// New setup, we're pulling from wfos.json now
const wfoChunks = [];
const wfoChunkSize = 50;
const totalWFOs = wfos.length;
// wfos is object "wfo": {"location": "Text Name", "room": "roomname"}
for (let i = 0; i < totalWFOs; i += wfoChunkSize) {
wfoChunks.push(wfos.slice(i, i + wfoChunkSize));
console.log(wfos.slice(i, i + wfoChunkSize))
}