ReferenceError: clientInformation is not defined

When I do “node .” in the cmd prompt, I get an error saying:

ReferenceError: clientInformation is not defined
at Object. (C:\Users\avsar\Desktop\Google Classroom Bot\main.js:12:1)
←[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)←[39m
←[90m at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:928:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)←[39m
←[90m at internal/main/run_main_module.js:17:47←[39m

My “main” (main.js) is:

const Discord = require(‘discord.js’);

const client = new Discord.Client();

client.once(‘ready’, () => {
console.log(‘Bartholomew is online!’);

clientInformation.login(‘my token’);

Can anyone help me fix this problem?

You haven’t defined clientInformation. I would assume you want to actually use client instead.


Ok, thank you. I will see if that works

You put your token in there. You should remove it and generate a new one


Thank you for letting me know, I have done that now

I just said that.


oh lol didn’t see that

1 Like