Discord isn't defined

I have discord installed, but my code:
const client = new Discord.Client();
doesn’t work and it gives me the following error:

ReferenceError: Discord is not defined
at Object.<anonymous> (/app/server.js:3:16)
at Module._compile (module.js:653:30)
at Object.Module._extensions…js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3

Everything was working fine, and I haven’t changed anything, but all of a sudden it just decides to stop working when I check back on it?

can you put this above const client

const Discord = require("discord.js");

Nevermind, fixed, apparently I deleted the first line that defined discord. :stuck_out_tongue:

1 Like