Este es el codigo
// Require the necessary discord.js classes
const { Client, Intents } = require('discord.js');
const { token } = require('./config.json');
// Create a new client instance
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
// When the client is ready, run this code (only once)
client.once('ready', () => {
console.log('Ready!');
});
//Respuesta:
client.users.get("someID").send("someMessage");
// Login to Discord with your client's token
client.login(token);
Me da un error TypeError:
TypeError: client.users.get is not a function
at Object.<anonymous> (C:\Users\danie\Desktop\Fueguitosss\index.js:14:14)
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
Mi version de node es:
C:\Users\danie>node
Welcome to Node.js v16.13.1.
Si alguien ve el error, o en lo que puedo estar fallando, que me ayude, estoy empezando en la progrmacion. Muchas gracias.