#Hey there, I've got an error.

64 messages · Page 1 of 1 (latest)

loud python
#

I have just created a bot

dense furnaceBOT
#

See #faq to learn how to properly share code on Discord: #faq message

sullen dock
#

What's your package.json and JS code?

loud python
#

hmm

#

lemees e

#

see*

sullen dock
#

(You can edit messages)

loud python
#

{
"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"
}
}

loud python
dense furnaceBOT
#

See #faq to learn how to properly share code on Discord: #faq message

loud python
#

i've been on discord for 3 yrs now

sullen dock
#

Then share the json as a json code block

loud python
#

i think

#

huh

loud python
sullen dock
#
  "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"
  }
loud python
#

oh

loud python
#

how do you do that

#

like

sullen dock
#

... Maybe click on the god damn faq link?

loud python
#

noooooo

#

like

#

the copy code button

#

and

#

all that

late fox
#

dude.. click... the.. link

#

also show index.js once you learn how (you seem to have a busted require())

sullen dock
#

Are you asking how I copy pasted your message content perhaps? 🤔

loud python
#

u know what i mean??

#

like

#

maybe this

#

hi

late fox
loud python
#

nvm

#

thank u

sullen dock
#

This is called a code block

loud python
#

im so flipping stupd

#

hi

late fox
#

now show all your require() statements

loud python
#

on the package.json

#

/??

late fox
#

require() is JS, not JSON

loud python
#

oh yeah

#

im new

late fox
#

you should probably work on your reading comprehension, bud

loud python
#

ima just show u my whole index.js

sullen dock
#

As long as it's in a code block

loud python
#

its 2 long

late fox
#
    for (file of functions) {
        require(`./functions/${file}`)(client);
    }
#

guess the error message is wrong for that...

#

how are you running your script?

sullen dock
loud python
#

im awake

#

@sullen dock @late fox

loud python
#

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

late fox
#

So open that file and go to line 11. Wherever you’re using .has() is undefined.

sullen dock
#

You should probably delete your project and follow the guide