Change Status

Hi, how can i change my discord bot status?
11 Replies
d.js toolkit
d.js toolkit•5mo 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!
mizorint
mizorint•5mo ago
In your event listener, in the onReady event,
PhonedLeek25
PhonedLeek25•5mo ago
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
mizorint
mizorint•5mo ago
you shall add this code:
client.user.setActivity({
type: ActivityType.Watching,
name: 'for /help',
});
client.user.setActivity({
type: ActivityType.Watching,
name: 'for /help',
});
Also, don't forget to import the
ActivityType
ActivityType
class from the discord.js lib e. g.
const { Client, IntentsBitField, EmbedBuilder, ActivityType, ClientUser, messageLink, Embed } = require('discord.js');
const { Client, IntentsBitField, EmbedBuilder, ActivityType, ClientUser, messageLink, Embed } = require('discord.js');
you can modify the type to ActivityType.Watching to ActivityType.Playing, ActivityType.Listening or ActivityType.Streaming. but if you change to streaming, dont forget to add an url to the stream/video/whatever and the name field, to whatever you want. and I think, that's it. you may also want to check out this:
PhonedLeek25
PhonedLeek25•5mo ago
@korinn did it work?
korinn
korinn•5mo ago
Nope :(
PhonedLeek25
PhonedLeek25•5mo ago
I just implemented it on my bot I can show you the code
korinn
korinn•5mo ago
Please
PhonedLeek25
PhonedLeek25•5mo ago
make sure to include this in your requires('discord.js') part
No description
PhonedLeek25
PhonedLeek25•5mo ago
client.on("ready", () =>
{

console.log("Ready!")
client.user.setActivity('Netflix', { type: ActivityType.Watching });
});
client.on("ready", () =>
{

console.log("Ready!")
client.user.setActivity('Netflix', { type: ActivityType.Watching });
});
careful, if you already have another client.on part, don't have two! jsut take this line of code client.user.setActivity('Netflix', { type: ActivityType.Watching }); and add it to that existing function
Squid
Squid•5mo ago
You can also set your activities in the presence object of the options object you use when creating your Client instance
Want results from more Discord servers?
Add your server