Androz2091 / discord-backup

📦 Complete framework to facilitate server backup using discord.js v13
https://npmjs.com/package/discord-backup
MIT License
431 stars 81 forks source link

TypeError [ClientMissingIntents]: Valid intents must be provided for the Client. #523

Open DAMIOSKIDEV opened 11 months ago

DAMIOSKIDEV commented 11 months ago

I got an error as soon as I launched the bot

I saw that Discord has a new Gateway and that you have to enter "intents", but I don't know which ones to enter.

Full Error

ypeError [ClientMissingIntents]: Valid intents must be provided for the Client.
    at Client._validateOptions (/root/discord-backup/node_modules/discord.js/src/client/Client.js:492:13)
    at new Client (/root/discord-backup/node_modules/discord.js/src/client/Client.js:78:10)
    at Object.<anonymous> (/root/discord-backup/start.js:4:10)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'ClientMissingIntents'

The specific line that I need to change:

client = new Discord.Client(),

Source: https://stackoverflow.com/questions/68694195/how-do-i-fix-client-missing-intents-error