#Membercount Array issue
1 messages · Page 1 of 1 (latest)
ok
So, Let me send the part with all of the stuff
const arrayOfStatus = [
`SU/AJ Communuity`,
`you.`,
`Netflix`,
`Youtube`,
`Twitch`,
`Disney Plus`,
`TikTok`,
`#〢gamer-chat`,
`#〢memes`,
`#〢announcements`,
`#〢content-posts`,
`your mom.`,
`for Tasks!`,
`Toilet Flushes`,
`Megalovania`,
`People Poop`,
`from the closet`,
`from the window`,
`you sleep`,
`you cry.`,
`from under da bed`, saber.guilds.cache.get('890248799094710272').memberCount + `Members!`,
]
saber.on('ready', async function() {
saber.user.setActivity({ name: 'Waking Up...', type: "PLAYING" });
setInterval(() => {
saber.user.setActivity({ name: `${arrayOfStatus[Math.floor(Math.random() * arrayOfStatus.length)]}`, type: "WATCHING" })
}, 20000)
console.log('-- loaded client display --');
console.log(`-- ${saber.user.tag} has logged onto the Discord API (${saber.ws.ping}ms) -- `)
StatusHook.send(`${saber.user.tag} Enabled. || Client Status Updated `);
});
and what is your error?
TypeError: Cannot read properties of undefined (reading 'memberCount')
at Object.<anonymous> (C:\Users\Administrator\Desktop\SU-AJ Bot\index.js:87:49)
[90m at Module._compile (node:internal/modules/cjs/loader:1101:14)[39m
[90m at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)[39m
[90m at Module.load (node:internal/modules/cjs/loader:981:32)[39m
[90m at Function.Module._load (node:internal/modules/cjs/loader:822:12)[39m
[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)[39m
[90m at node:internal/main/run_main_module:17:47[39m
add a ? before .memberCount
Comes up as an Error Within the code
whats the error
Its quite litterally like a spelling mistake in a sentence. I haven't even noded it yet
what?
ok try this
VSC Error
Send that line
Don't add spaces
const arrayOfStatus = [
`SU/AJ Communuity`,
`you.`,
`Netflix`,
`Youtube`,
`Twitch`,
`Disney Plus`,
`TikTok`,
`#〢gamer-chat`,
`#〢memes`,
`#〢announcements`,
`#〢content-posts`,
`your mom.`,
`for Tasks!`,
`Toilet Flushes`,
`Megalovania`,
`People Poop`,
`from the closet`,
`from the window`,
`you sleep`,
`you cry.`,
`from under da bed`,
`${saver.guilds.cache.get('890248799094710272')?.memberCount} Members!`,
]
I'll try it
also friendly tip. dont use template literals unless you want to add a code and string in the same line
if its only a string, just do ""