when i started the code i’ve got this error
Error: Cannot find module 'node:events'
Require stack:
- C:RAGEMPserver-filesnode_modulesdiscord.jssrcclientBaseClient.js
- C:RAGEMPserver-filesnode_modulesdiscord.jssrcindex.js
- C:RAGEMPserver-filespackagesDominoRPdiscordindex.js
- C:RAGEMPserver-filespackagesDominoRPindex.js
- C:RAGEMPserver-filesbinloader.mjs
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:893:15)
at Function.Module._load (internal/modules/cjs/loader.js:743:27)
at Module.require (internal/modules/cjs/loader.js:965:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:RAGEMPserver-filesnode_modulesdiscord.jssrcclientBaseClient.js:3:22)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782:14)
at Module.require (internal/modules/cjs/loader.js:965:19)
this is my code
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', async () => {
console.log('!!! => Discord bot has authenticated successfully...');
sendMsgToServerStatus();
});
i have upgrade to node 16.13 but same thing. Can anyone help me?