Bot presence not updating

code:
client.user?.setPresence({
status,
activities: [
{
name: client.config.botPresence.activity.replacer({ totalPlayers, totalMaxPlayers, totalServers }),
type,
},
],
});
console.log(client.user?.presence);
client.user?.setPresence({
status,
activities: [
{
name: client.config.botPresence.activity.replacer({ totalPlayers, totalMaxPlayers, totalServers }),
type,
},
],
});
console.log(client.user?.presence);
console:
ClientPresence {
userId: null,
guild: null,
status: 'Online',
activities: [
Activity {
name: '0 players on 2 servers',
type: 'Watching',
url: null,
details: null,
state: null,
applicationId: null,
timestamps: null,
party: null,
assets: null,
flags: [ActivityFlagsBitField],
emoji: null,
buttons: [],
createdTimestamp: undefined
}
],
clientStatus: null
}
ClientPresence {
userId: null,
guild: null,
status: 'Online',
activities: [
Activity {
name: '0 players on 2 servers',
type: 'Watching',
url: null,
details: null,
state: null,
applicationId: null,
timestamps: null,
party: null,
assets: null,
flags: [ActivityFlagsBitField],
emoji: null,
buttons: [],
createdTimestamp: undefined
}
],
clientStatus: null
}
For some reason my bot does not have any status or custom presence. anyone know why?
9 Replies
d.js toolkit
d.js toolkit15mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Parogo_72
Parogo_7215mo ago
Well, it does have an Online status And the activity seems to be correct too (as the log shows)
Default
DefaultOP15mo ago
should it be a number ?
Parogo_72
Parogo_7215mo ago
I meant "does" I dont get your issue, it has the status and also the activity correctly
Default
DefaultOP15mo ago
thats why im confused, im working for years with discord with djs bun never had this issue before
Parogo_72
Parogo_7215mo ago
What issue
Default
DefaultOP15mo ago
for some reason while the client object is correct it does not display it in discord
No description
Parogo_72
Parogo_7215mo ago
And is that the only setPresence that you have? Or setActivity
Default
DefaultOP15mo ago
yes this is inside the clientReady event For some reason i fixed the issue, but i have no idea how
Want results from more Discord servers?
Add your server