index.js
const o = require('./altoken')
for(const i=1; i<99; i++){
if(o.opts[i].identity.username === null){break;}; //error here
message.guild.channels.create(o.opts[i].identity.username, {type: "text",parent: id})
}
altoken.js
module.exports.opts1 = {
mro: {
as: false,
},
identity: {
username: "x",
password: "x"
},
krlo: [
'x',
]
};
I want to create as many channels as modules in altoken.js but I am getting an error. TypeError: Cannot read property '1' of undefined