discord js auto changing status

Solutions on MaxInterview for discord js auto changing status by the best coders in the world

showing results for - "discord js auto changing status"
Elisa
26 Oct 2020
1client.on('ready' () => {
2   console.log('The bot is online')
3  
4  const statusArray = ['For Rule Breakers, WATCHING', 'Loki (Only On Disney+), WATCHING', 'GTAO, PLAYING', 'On Scarlet\'s Dream World, WATCHING', 'Music w Tiger\'s Rythm, LISTENING', ' Commands, LISTENING', 'Catching Variants, WATCHING', 'Football With Messi, PLAYING', 'Billie Eilish, LISTENING', 'HIVE Tresure Wars, PLAYING', ]; //What you want your statuses to be after puting the status name put a coma and a space and then the type what you want it to be note: please dont to it to STREAMING as you would have to input a twitch link
5
6    setInterval(() => {
7      client.user.setStatus('dnd');
8      const random = statusArray[Math.floor(Math.random() * statusArray.length)].split(', ')
9      const status = random[0];
10      const mode = random[1];
11      client.user.setActivity(status, { type: mode })
12
13    }, 3000) //your time of changing status in miliseconds for example 1 second = 1000 ms
14});