Ask coding questions

← Back to all posts
Sorry to be a bother
Bottian (1)

I've already posted this code a couple times but this should be the final one, fingers crossed. when I run the code everything seems fine but as soon as I try to use one of the commands in discord it says that "message is not defined". I know I'm probably just being dumb but I don't really know how to code and would love some help. thanks

Answered by Coder100 (18143) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (18143)

of course, it is because of this:

you made your argument called message but you tried to use it as msg. So either rename your argument to msg (line 46) or use as message (line 49)

also do this for every client.on, you made that mistake on every one of those.

Also, usually you would put these listeners only once, you can have more than one if statement on a listener!

Bottian (1)

honestly I feel like I'm in over my head. I'm just trying to make sense of a code I found and adapt it for my own purposes but I keep making mistakes. so demoralizing. even after your help it still doesn't work as I want it to even if everything is functioning as it should. it won't update the milestones so when I call .Milestones it just reads off the one that's already there. no update. so [email protected]

Coder100 (18143)

would you like to invite me to your repl so I can help @Bottian

Bottian (1)

umm how should I send you the link
@Coder100

Bottian (1)

do you have discord for the [email protected]