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
- 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!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 codeand what do yoy 'mean by not responding
I dont see any code there that shoukd make it respond
ah
activity type is am enum
💀
hi
my bot in offline
sorry for interfering in yalls business but
And how are you running the bot
i need help cloning a git repository
🥲
node bot.js
Not the place, #useful-servers
okay
its closed
And do you get any output in your console
.
no
😐
Is your code saved
what
Exactly what i ask
Is your code saved
sorry my main lang turkish
i saved my notepad
are you...coding in notepad?
no i coding in vsc
okay, and did you save your code there
ctrl + s
ye yes yes
add a console.log to see if that cose runs at all
can you give me an example
Thats basic js
You should know how to add a console.log
but i have small js knowledge
Then learn js first, #rules 3 #resources
can you not help me
😦
Not if you dont even know how to log something
I will if I have at least some knowledge of console.log
😊
#resources
@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 🌈
don’t ping them multiple times, they will help once they can.
sorry 😦
Because
setPresence
doesn't return a promisehow can i fix it
by not chaining a .then to it
Again
You should consider learning the basics of js first
type: 'PLAYING',
}
]
})
.then(() => console.log('Durum başarıyla ayarlandı!'))
.catch(error => console.error('Durum ayarlanırken bir hata oluştu:', error));
😐
#rules 3
We're here to help you wity discord.js issues, we're not here to teach you how js works
You are being very rude when offering assistance.
😔
I dont see how telling you to learn the basics of js is rude
Its a requirement
they are not
js is basic requirements lol