TypeError: (intermediate value).setToken(...) is not a function

7 Replies
d.js toolkit
d.js toolkit•11mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Post the full error stack trace, not just the top part! - Show your code! - Explain what exactly your issue is. - Not a discord.js issue? Check out #useful-servers. - Issue solved? Press the button!
STRK Mrbilal
STRK Mrbilal•11mo ago
TypeError: (intermediate value).setToken(...) is not a function
MrMythical
MrMythical•11mo ago
Add a semicolon after setToken(...)
STRK Mrbilal
STRK Mrbilal•11mo ago
;^; Okay Thks But why this error appear ?@Myth 🌈 can you explain me ? In Js we don't need the semicolon ... no ?
Danial
Danial•11mo ago
They're necessary in some cases, take yours as an example, if you don't put a semi colon, it gets things mixed up It's pretty common when working with IIFEs
MrMythical
MrMythical•11mo ago
It reads the next line as a function call
STRK Mrbilal
STRK Mrbilal•11mo ago
Okay I get it . Thanks 😄