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",
},
})
}
}
CodePudding user response:
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' }] });