ReferenceError: Discord is not defined at Object.<anonymous> (/home/runner/testing-a-bot/index.js:2:16) at Module._compile (node:internal/modules/cjs/loader:1159:14)
I was attempting to create a discord bot, this error has popped up. All of the code was in the below youtube video
My code for this:
const {Client, GatewayIntentBits, EmbedBuilder, PermissionsBitField, Permissions} = require( discord.js );
const client = new Discord.Client();
client.on("ready", () => {
console.log("It s ready")
})
client.login(assume the token is here)
I ran the code, this popped up. Just attempting to get the bot online and run basic code.
This problem isn t a duplicate, as far as I can tell the old posts don t work due to the age.