#Hey there, I've got an error.
64 messages · Page 1 of 1 (latest)
See #faq to learn how to properly share code on Discord: #faq message
What's your package.json and JS code?
(You can edit messages)
{
"dependencies": {
"axios": "^1.5.1",
"discord-gamecord": "^4.4.1",
"discord-giveaways": "^6.0.1",
"discord-html-transcripts": "^3.2.0",
"discord-logs": "^2.2.1",
"discord.js": "^14.16.3",
"dotenv": "^16.3.1",
"moment": "^2.29.4",
"mongoose": "^6.0.12",
"ms": "^2.1.3",
"superagent": "^8.1.2"
},
"scripts": {
"start": "node src/index.js"
}
}
ik
See #faq to learn how to properly share code on Discord: #faq message
i've been on discord for 3 yrs now
Then share the json as a json code block
wdym
"dependencies": {
"axios": "^1.5.1",
"discord-gamecord": "^4.4.1",
"discord-giveaways": "^6.0.1",
"discord-html-transcripts": "^3.2.0",
"discord-logs": "^2.2.1",
"discord.js": "^14.16.3",
"dotenv": "^16.3.1",
"moment": "^2.29.4",
"mongoose": "^6.0.12",
"ms": "^2.1.3",
"superagent": "^8.1.2"
},
"scripts": {
"start": "node src/index.js"
}
oh
oh wait
how do you do that
like
... Maybe click on the god damn faq link?
dude.. click... the.. link
also show index.js once you learn how (you seem to have a busted require())
Are you asking how I copy pasted your message content perhaps? 🤔
no
u know what i mean??
like
maybe this
hi
if you clicked this link and read, you would learn how... why are you making this so difficult?
This is called a code block
huh
now show all your require() statements
require() is JS, not JSON
you should probably work on your reading comprehension, bud
ima just show u my whole index.js
As long as it's in a code block
for (file of functions) {
require(`./functions/${file}`)(client);
}
guess the error message is wrong for that...
how are you running your script?
i got another error
TypeError: Cannot read properties of undefined (reading 'has')
at Object.execute (C:\Users\Elyas Hacking\Desktop\Focus Here\src\commands\Moderation\verify2.js:11:44)
at Object.execute (C:\Users\Elyas Hacking\Desktop\Focus Here\src\events\interactionCreate.js:30:27)
at Client.<anonymous> (C:\Users\Elyas Hacking\Desktop\Focus Here\src\functions\handelEvents.js:8:58)
at Client.emit (node:events:518:28)
at InteractionCreateAction.handle (C:\Users\Elyas Hacking\Desktop\Focus Here\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (C:\Users\Elyas Hacking\Desktop\Focus Here\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\Elyas Hacking\Desktop\Focus Here\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31)
at WebSocketManager.<anonymous> (C:\Users\Elyas Hacking\Desktop\Focus Here\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12)
at WebSocketManager.emit (C:\Users\Elyas Hacking\Desktop\Focus Here\node_modules@vladfrangu\async_event_emitter\dist\index.cjs:287:31)
at WebSocketShard.<anonymous> (C:\Users\Elyas Hacking\Desktop\Focus Here\node_mo
So open that file and go to line 11. Wherever you’re using .has() is undefined.
i do not know how to define it
You should probably delete your project and follow the guide