my bot not responding

I'm trying to make a bot, but it can't get online. I think the problem is not caused by me.😭
44 Replies
d.js toolkit
d.js toolkit4mo 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!
!            NebulaNomad !
! NebulaNomad !OP4mo ago
const { Client, GatewayIntentBits } = require('discord.js'); const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers] }); const TOKEN = 'zcvsdfg'; client.once('ready', () => { console.log(bot working); client.user.setPresence({ status: 'online', activities: [ { name: 'Kod yazıyorum!', type: 'PLAYING', } ] }) .then(() => console.log('Durum başarıyla ayarlandı!')) .catch(console.error); }); client.login(TOKEN); my status code
treble/luna
treble/luna4mo ago
and what do yoy 'mean by not responding I dont see any code there that shoukd make it respond ah activity type is am enum
d.js docs
d.js docs4mo ago
:dtypes: v10: ActivityType read more
!            NebulaNomad !
! NebulaNomad !OP4mo ago
💀
larp
larp4mo ago
hi
!            NebulaNomad !
! NebulaNomad !OP4mo ago
my bot in offline
larp
larp4mo ago
sorry for interfering in yalls business but
treble/luna
treble/luna4mo ago
And how are you running the bot
larp
larp4mo ago
i need help cloning a git repository 🥲
!            NebulaNomad !
! NebulaNomad !OP4mo ago
node bot.js
treble/luna
treble/luna4mo ago
Not the place, #useful-servers
larp
larp4mo ago
okay its closed
treble/luna
treble/luna4mo ago
And do you get any output in your console
larp
larp4mo ago
.
!            NebulaNomad !
! NebulaNomad !OP4mo ago
no 😐
treble/luna
treble/luna4mo ago
Is your code saved
!            NebulaNomad !
! NebulaNomad !OP4mo ago
what
treble/luna
treble/luna4mo ago
Exactly what i ask Is your code saved
!            NebulaNomad !
! NebulaNomad !OP4mo ago
sorry my main lang turkish i saved my notepad
treble/luna
treble/luna4mo ago
are you...coding in notepad?
!            NebulaNomad !
! NebulaNomad !OP4mo ago
no i coding in vsc
treble/luna
treble/luna4mo ago
okay, and did you save your code there ctrl + s
!            NebulaNomad !
! NebulaNomad !OP4mo ago
ye yes yes
treble/luna
treble/luna4mo ago
add a console.log to see if that cose runs at all
!            NebulaNomad !
! NebulaNomad !OP4mo ago
can you give me an example
treble/luna
treble/luna4mo ago
Thats basic js You should know how to add a console.log
!            NebulaNomad !
! NebulaNomad !OP4mo ago
but i have small js knowledge
treble/luna
treble/luna4mo ago
Then learn js first, #rules 3 #resources
!            NebulaNomad !
! NebulaNomad !OP4mo ago
can you not help me 😦
treble/luna
treble/luna4mo ago
Not if you dont even know how to log something
!            NebulaNomad !
! NebulaNomad !OP4mo ago
I will if I have at least some knowledge of console.log 😊
treble/luna
treble/luna4mo ago
#resources
!            NebulaNomad !
! NebulaNomad !OP4mo ago
@wolvinny 🌈 i console.log added and my bot worked but i get an error TypeError: client.user.setPresence(...).then is not a function at Client.<anonymous> (C:\Users\re\Desktop\ugyfy\bot.js:22:6) WebSocketShard.js:181:12) at WebSocketShard.gotGuild (C:\Users\re\Desktop\ugyfy\node_modules\discord.js\src\client\websocket\WebSocketShard.js:155:10) at WebSocketManager.<anonymous> (C:\Users\re\Desktop\ugyfy\node_modules\discord.js\src\client\websocket\WebSocketManager.js:241:15) @wolvinny 🌈
S🅰pph
S🅰pph4mo ago
don’t ping them multiple times, they will help once they can.
!            NebulaNomad !
! NebulaNomad !OP4mo ago
sorry 😦
NyR
NyR4mo ago
Because setPresence doesn't return a promise
!            NebulaNomad !
! NebulaNomad !OP4mo ago
how can i fix it
treble/luna
treble/luna4mo ago
by not chaining a .then to it Again You should consider learning the basics of js first
!            NebulaNomad !
! NebulaNomad !OP4mo ago
type: 'PLAYING', } ] }) .then(() => console.log('Durum başarıyla ayarlandı!')) .catch(error => console.error('Durum ayarlanırken bir hata oluştu:', error)); 😐
treble/luna
treble/luna4mo ago
#rules 3 We're here to help you wity discord.js issues, we're not here to teach you how js works
!            NebulaNomad !
! NebulaNomad !OP4mo ago
You are being very rude when offering assistance. 😔
treble/luna
treble/luna4mo ago
I dont see how telling you to learn the basics of js is rude Its a requirement
Retro
Retro4mo ago
they are not js is basic requirements lol
Want results from more Discord servers?
Add your server