Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with bot #31

Open
johncsuti opened this issue Oct 16, 2021 · 4 comments
Open

Issues with bot #31

johncsuti opened this issue Oct 16, 2021 · 4 comments

Comments

@johncsuti
Copy link

johncsuti commented Oct 16, 2021

There are 2 noticeable issues with the bot one being
[Error: ENOENT: no such file or directory, scandir './events/'] {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: './events/'
}
[Error: ENOENT: no such file or directory, scandir './commands/'] {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: './commands/'
}
The fix for this is to replace ./events/ and ./commands/ with ./src/events/ and ./src/commands/ respectively

Finally there is this issue when you try to upload.
node:fs:585
handleErrorFromBinding(ctx);
^

Error: ENOENT: no such file or directory, open 'this'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at Object.exports.run (/home/container/src/commands/haste.js:12:42)
at module.exports (/home/container/src/events/message.js:14:9)
at Client.emit (node:events:390:28)
at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: 'this'
}
The fix for this being setting dir_uploader to false in the config.json

@johncsuti
Copy link
Author

Seems like Pull request #30 is problematic?

@davidcralph
Copy link
Owner

I've taken a look into this and fixed the issue caused by #30

I can't reproduce the top issue, what command are you using to start the bot?

@johncsuti
Copy link
Author

Its a kinda long command ran by pterodactyl here is the full command:
if [[ -d .git ]] && [[ ${AUTO_UPDATE} == "1" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then /usr/local/bin/npm install ${NODE_PACKAGES}; fi; if [[ ! -z ${UNNODE_PACKAGES} ]]; then /usr/local/bin/npm uninstall ${UNNODE_PACKAGES}; fi; if [ -f /home/container/package.json ]; then /usr/local/bin/npm install; fi; /usr/local/bin/node /home/container/${BOT_JS_FILE}

@johncsuti
Copy link
Author

johncsuti commented Oct 16, 2021

I've taken a look into this and fixed the issue caused by #30

I can't reproduce the top issue, what command are you using to start the bot?

Updated the bot and found the issue is still kinda there nothing gets uploaded.
Here is what discord says: (There is no error in console)
Screenshot from 2021-10-16 19-08-15
Once again turning off dir_upload fixes the top issue the bottom issue still doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants