Answer the question
In order to leave comments, you need to log in
How to put Discord bot status on Discord.JS 12.2.0?
Hey!
I started creating a bot for my Discord server and I don't know how to put the bot status on the new version.
Could you tell?
I looked for answers on qna.habr.com, I did not find answers.
Tried to shove discord.js from offsite
client.user.setPresence({ activity: { name: 'в novaland.js' }, status: 'idle' })
.then(console.log)
.catch(console.error);
Answer the question
In order to leave comments, you need to log in
the 'idle' status is set a little differently:
the correct one would look like this:
bot.user.setStatus('idle')
bot.user.setPresence({
game: {
name: 'в novland,js ',
type: "LISTENING",
}
});
game: {
name: 'в novland,js ',
type: "LISTENING",
url: "ссылка_на_twitch_трансляцию" // <<< //
}
I don't know but my bot command is:
client.on('ready', () => {
console.log(`Bot is ready`);
client.user.setPresence({
status: 'idle',
activity: {
type: 'PLAYING',
name: ' Your-text',
},
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question