2021年4月23日星期五

Refreshing Discord Bot's Activity Upon Being Added To A Server

I have a discord bot where its activity is set like below

module.exports = (client) => {    console.log(`${client.user.username} ✅`)     const activities = [      `Music Videos`,      `*help`,      `In ${client.guilds.cache.size} Servers`,      `Support Server ====> discord.gg/ZJevrUQ46Q`    ];        let i = 0;    setInterval(() => client.user.setActivity(`${activities[i++ % activities.length]}`, { type: 'PLAYING' }), 5000);        }  

Is there any way for me to update its server count when it's added to a new server?

Thanks in advance!

https://stackoverflow.com/questions/67222760/refreshing-discord-bots-activity-upon-being-added-to-a-server April 23, 2021 at 09:20AM

没有评论:

发表评论