bot status

let status = [
{
name: 'death',
type:ActivityType.Playing,
},
{
name: 'life',
type:ActivityType.Playing,
},
]

client.on('ready', (c) => {
console.log('bot is online.');

setInterval(() => {
let random = Math.floor(Math.random * status.length);
client.user.setActivity(status[random]);
}, 15000);
});
let status = [
{
name: 'death',
type:ActivityType.Playing,
},
{
name: 'life',
type:ActivityType.Playing,
},
]

client.on('ready', (c) => {
console.log('bot is online.');

setInterval(() => {
let random = Math.floor(Math.random * status.length);
client.user.setActivity(status[random]);
}, 15000);
});
but the bot won't show status
5 Replies
d.js toolkit
d.js toolkit9mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
kin.ts
kin.ts9mo ago
Math.random is a function, call it
f(x) = 1/x
f(x) = 1/xOP9mo ago
how ;-;
kin.ts
kin.ts9mo ago
basic js, just add () after Math.random, just like how you call setActivity function
f(x) = 1/x
f(x) = 1/xOP9mo ago
thank you!
Want results from more Discord servers?
Add your server