test
This commit is contained in:
parent
69ab79e930
commit
9c1703d1ae
10
index.js
10
index.js
|
@ -943,20 +943,16 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
await interaction.deferReply({ ephemeral: true })
|
await interaction.deferReply({ ephemeral: true })
|
||||||
var category;
|
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
|
// New setup, we're pulling from wfos.json now
|
||||||
const wfoChunks = [];
|
const wfoChunks = [];
|
||||||
const wfoChunkSize = 50;
|
const wfoChunkSize = 50;
|
||||||
const totalWFOs = wfos.length;
|
const totalWFOs = wfos.length;
|
||||||
|
// wfos is object "wfo": {"location": "Text Name", "room": "roomname"}
|
||||||
for (let i = 0; i < totalWFOs; i += wfoChunkSize) {
|
for (let i = 0; i < totalWFOs; i += wfoChunkSize) {
|
||||||
wfoChunks.push(wfos.slice(i, i + wfoChunkSize));
|
wfoChunks.push(wfos.slice(i, i + wfoChunkSize));
|
||||||
|
console.log(wfos.slice(i, i + wfoChunkSize))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue