Home > database >  how to change the activities title *Respectively* in discord.js?
how to change the activities title *Respectively* in discord.js?

Time:02-19

hey i wanna do something on discord.js but just don't know how, i know that it's possible but idk how so i wanted to ask ya guys that: i wanna set my bot's activity like it's keep being changed respectively not randomly. it shouldn't be randomly because....uhhh....you'll realize soon ._.

here's my activity's codes but it's in randomly(i want it to be respectively as i said):

client.on("ready") {
        console.log('Boom bot is ready to boom!')
        setInterval(() => {
            var v = (client.guilds.cache.size)
            const count = [
                "1", "2", "3", "BOOM!"]
            // here it collects the titles in randomly
            const number = Math.floor(Math.random()*(count.length))
            const activity = count[number]
            
            client.user.setActivity(activity);
        };
    })

if anybody here knows how to get the numbers of number variable respectively, plz consider helping this guy

  • Related