O
O
Oleg2020-09-15 13:39:55
Node.js
Oleg, 2020-09-15 13:39:55

Why is discord bot js not working?

Worked for 3 weeks, stopped yesterday. The token is valid (changed)
What could be the problem.

On the next (and on the same one I tried) other bots work properly.

const Discord = require('discord.js');
const client = new Discord.Client();

client.once('ready', () => {
    console.log('Ready!');
});

client.login('NzMwNjU0MDc0NTc1MjU3NjUy.Xwaoog.jE');

Those. it just stays silent without errors.
Where to dig? Tell.
5f6099af73d4e216805071.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2020-09-15
@VDT2

Try subscribing to other events from the client, warn, error, debugand output the information:

client.on('error', (e) => {
    console.log('error', e);
});
client.on('debug', (e) => {
    console.log('debug', e);
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question