Ask coding questions

← Back to all posts
Bot status
RyanJackson3

So I am currently scripting a discord bot using node.js but I cannot figure out how to make a bot status similar to this

I would really appreciate if anyone can tell me how to do this. Thanks!

Voters
HaydenSchmidt2
sathyavasan2008
sayuch
Lkhamtsam
io23
aadhinathbot
CammyQueen
retronbv
RyanJackson3
Comments
hotnewtop
[deleted]

you can use this piece of code here.

In the last line you can put whatever status you want.

retronbv

client.on('ready', () => {
client.user.setPresence({ game: { name: 'with discord.js' }, status: 'idle' })
console.log(${client.user.username} is up and running!);
})

RyanJackson3

@retronbv So I used the code you gave me. When I ran it it said "client not defined" so I modified the code to this

The bot was able to start up but the status didn't show on the bot. Can you help with that?

RyanJackson3

@RyanJackson3 Never mind. I have recently discovered that game is no longer supported.

retronbv

game is still supported i think

RyanJackson3

@retronbv It is not.