A
A
AndreyKawilov2021-02-08 08:55:21
Node.js
AndreyKawilov, 2021-02-08 08:55:21

Discord.js broke, what should I do?

discord.js v 12.5.1

Even simple console output doesn't work. What to do?

const Discord = require('discord.js')
const config = require('./botconfig.json')
const client = new Discord.Client({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'] })

client.on("guildMemberAdd", async member => {

    console.log("test")

})

client.on('ready', async () => {
    console.log("ready!")
})

client.login(config.token)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-02-08
@AndreyKawilov

try in the bot profile, in the Discord Developer Portal, in the Bot tab, enable the "Server Members Intent" item.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question