#How do I set the status of my bot?

42 messages · Page 1 of 1 (latest)

distant sparrow
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

oak ice
#

discord.js Version: 14.6.0
node.js Version: v18.12.1

distant sparrow
#

so?

#

you get any errors or smth?

#

activities should be an array btw

oak ice
distant sparrow
#

show ready.js line 6

oak ice
oak ice
#

like that?

distant sparrow
#

yes

#

btw there is no ready status, and use enums for activity type

#

ActivityType.Playing

oak ice
#

like that?

distant sparrow
#

why did you put status there

oak ice
#
client.user.setPresence({status: "PLAYING", activities: [{ name: 'with some scripts!', type: ActivityType.Playing }]});
#

like this?

distant sparrow
#

why did you put status there

oak ice
#

idk

distant sparrow
#

remove it

oak ice
#

ok

distant sparrow
#

it should be either online or idle or invisible or dnd

#

but defaults to online

oak ice
#

k

#
client.user.setPresence({activities: [{ name: 'with some scripts!', type: ActivityType.Playing }]});
#

So like this?

distant sparrow
#

yes

oak ice
#

Does not work

#

Uncaught ReferenceError ReferenceError: ActivityType is not defined

distant sparrow
#

import it

oak ice
#

how?

distant sparrow
#

by importing it

#

basic js

thin ravine
#

const { ActivityType } = require('discord.js');

distant sparrow
#

smh ok

#

i mean not ok but ill let it slide

oak ice
#

ok

thin ravine
#

Ay I saw you stop typing and that was it it was open season

distant sparrow
#

what

thin ravine
#

you were typing and I did not send but it showed you stop and I thought you were not gonna respond

distant sparrow
#

i was about to say that i already made enough tips