Error while initiating my discord.js bot


#1

Hello

I was trying to initiate my discord.js bot when I got this:

[2019-01-23 17:57:34]: LOG Loading Command: eval.js
[2019-01-23 17:57:34]: LOG Loading Command: help.js
[2019-01-23 17:57:34]: LOG Loading Command: level.js
[2019-01-23 17:57:34]: LOG Loading Command: mylevel.js
[2019-01-23 17:57:34]: LOG Loading Command: ping.js
[2019-01-23 17:57:34]: LOG Loading Command: poll.js
[2019-01-23 17:57:34]: LOG Loading Command: reboot.js
[2019-01-23 17:57:34]: LOG Loading Command: reload.js
[2019-01-23 17:57:34]: LOG Loading Command: say.js
Unable to load command say.js: SyntaxError: Unexpected token case
[2019-01-23 17:57:34]: LOG Loading Command: set.js
[2019-01-23 17:57:34]: LOG Loading Command: stats.js
[2019-01-23 17:57:34]: LOG Loading a total of 6 events.
[2019-01-23 17:57:34]: LOG Loading Event: error
[2019-01-23 17:57:34]: LOG Loading Event: guildCreate
[2019-01-23 17:57:34]: LOG Loading Event: guildDelete
[2019-01-23 17:57:34]: LOG Loading Event: guildMemberAdd
[2019-01-23 17:57:34]: LOG Loading Event: message
[2019-01-23 17:57:34]: LOG Loading Event: ready
[2019-01-23 17:57:34]: ERROR Unhandled rejection: ReferenceError: message is not defined

My github repository: https://github.com/TheBigerGamer/guidebot

Please help me!!!


#2

@TheBigerGamer I’ll take a look.


#3

Ok where is the error coming from?


#4

I don’t know. In the error log, it gets error when it loads “ready.js”…


#5

I found the error! It was my leveling command. But thanks for trying to help me.


#6

In basic … message is undefined .