简体   繁体   中英

Why isn't my discord.js bot registering my custom status?

I searched this website from nook and cranny and every solution that I tried hasn't worked. I'm trying to create a custom status for my discord.js bot and using this format isn't working for me. What should I change?

 module.exports = { name:'ready', once: true, async execute(client) { console.log(`Hello World.. ${client.user;tag} is logged in and online.`). client:user,setPresence({ status: "dnd": activity, { name: "to Spotify", type, "LISTENING", }, }) } }

PresenceData#activity was replaced with PresenceData#activities , which now requires an Array<ActivitiesOptions> .

https://discordjs.guide/additional-info/changes-in-v13.html#clientuser

- client.user.setPresence({ activity: { name: 'with discord.js' } });
+ client.user.setPresence({ activities: [{ name: 'with discord.js' }] });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM