Coding help needed!
I made a discord bot today and need sash commands on everything, but i dont know how i make that!
What i have on my bot is
-Balance.js
-Beg.js
-Buy.js
-Daily.js
-Deposit.js
-eaderboard.js
-Pay.js
-Profile.js
-Removemoney.js
-Rob.js
-Roulette.js
-Sell.js
-Slots.js
-Store.js
-Store2.js
-Weekly.js
-whitdrwa.js
-work.js
Can anyone please help me out ❤️
56 Replies
- What's your exact discord.js
npm list discord.js and node node -v version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
the problem is i dont understand how to do it
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
its okey it shows how to do it, but as i said i dont understand it
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
everything, i have never done it before
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
i already did look at the guide
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
what i need is help to make it, since i dont understand the guide at all
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
so what should i call that group? so i can start try making it
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
file in my console
what should i call it?
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
the main issue is to set up slash commands, thats where im stuck
what i tried now and it didnt work
Can you elaborate on what you mean by "didn't work"?
the console crash
Did it say anything?
let me add it, and send the error message
:/home/container$ if [[ "${USER_UPLOAD}" != "1" ]] && [[ -n "${GIT_ADDRESS}" ]]; then if [[ ! -d ".git" ]]; then git init && git remote add origin "${GIT_ADDRESS}" && git fetch origin ${BRANCH:-main} && git reset --hard origin/${BRANCH:-main}; fi; if [[ "${AUTO_UPDATE}" == "1" ]]; then if [[ -n "${ACCESS_TOKEN}" ]] && [[ -n "${USERNAME}" ]]; then git remote set-url origin "https://${USERNAME}:${ACCESS_TOKEN}@$(echo ${GIT_ADDRESS} | sed -e 's#https://##')"; fi; git pull origin ${BRANCH:-$(git rev-parse --abbrev-ref HEAD)}; fi; fi; if [[ -n "${NODE_PACKAGES}" ]]; then npm install ${NODE_PACKAGES}; fi; if [[ -n "${UNNODE_PACKAGES}" ]]; then npm uninstall ${UNNODE_PACKAGES}; fi; if [[ -f "/home/container/package.json" ]]; then npm install; fi; clear; if [[ "${MAIN_FILE}" == bot.js deploy-commands.js ]]; then node "/home/container/${MAIN_FILE}" ${NODE_ARGS}; else ts-node --esm "/home/container/${MAIN_FILE}" ${NODE_ARGS}; fi
/entrypoint.sh: eval: line 16: syntax error in conditional expression
Zluqe: Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 2
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Checking server disk space usage, this could take a few seconds...
[Pterodactyl Daemon]: Updating process configuration files...
[Pterodactyl Daemon]: Ensuring file permissions are set correctly, this could take a few seconds...
Zluqe: Server marked as starting...
[Pterodactyl Daemon]: Pulling Docker container image, this could take a few minutes to complete...
[Pterodactyl Daemon]: Finished pulling Docker container image
v21.7.3
:/home/container$ if [[ "${USER_UPLOAD}" != "1" ]] && [[ -n "${GIT_ADDRESS}" ]]; then if [[ ! -d ".git" ]]; then git init && git remote add origin "${GIT_ADDRESS}" && git fetch origin ${BRANCH:-main} && git reset --hard origin/${BRANCH:-main}; fi; if [[ "${AUTO_UPDATE}" == "1" ]]; then if [[ -n "${ACCESS_TOKEN}" ]] && [[ -n "${USERNAME}" ]]; then git remote set-url origin "https://${USERNAME}:${ACCESS_TOKEN}@$(echo ${GIT_ADDRESS} | sed -e 's#https://##')"; fi; git pull origin ${BRANCH:-$(git rev-parse --abbrev-ref HEAD)}; fi; fi; if [[ -n "${NODE_PACKAGES}" ]]; then npm install ${NODE_PACKAGES}; fi; if [[ -n "${UNNODE_PACKAGES}" ]]; then npm uninstall ${UNNODE_PACKAGES}; fi; if [[ -f "/home/container/package.json" ]]; then npm install; fi; clear; if [[ "${MAIN_FILE}" == bot.js deploy-commands.js ]]; then node "/home/container/${MAIN_FILE}" ${NODE_ARGS}; else ts-node --esm "/home/container/${MAIN_FILE}" ${NODE_ARGS}; fi
/entrypoint.sh: eval: line 16: syntax error in conditional expression
Zluqe: Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 2
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago.
its the error message
but when i remove it, the console work
what host are you using, this says there is a syntax error in the entrypoint.sh which is defined by the host and cannot be changed by the user
does it work if you run it on your local pc
it works when i remove it
im just trying to setup slash commands
wait do you have 2 files in the startup files sectiob
what you mean?
i did renmane it cmd
maybe that help?
bot.js deploy-commands.js
this is in the startup messgae
you can only run one at a time not both
okey, i have bot.js
deploy commands is meant to be ran on your pc once to sync your commands to discord it doesn't need to run every single time the bot starts
so how do i set it up? i know nothing about this
run the deploy-commands.js file locally on your pc and remove it from the host startup files
i get that, but how do i run it?
thats what im asking
youre talking to a noob here 🤣
This seems like an issue with your host's environment and not the code you sent, so I'd consult their support for how to resolve this (unless what Tomsoz said is true, I don't know)
Do you have Node.js installed? Do you know how to use it?
it was they who sent me here so
no i do not know how to use it
I suggest reading some of the tutorials found in #resources in that case
im close to give up
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
im trying the best i can, and i dont get it
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
the probem is still slash commands as i said 4 times now
tbh you're better off learning the fundamentals of JavaScript and node it will help you understand this much better
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
i get that, its just making me mad, because i dpnt understand anything about it
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
what im trying to do is setup sash commmands, but every time i try to add the code to mhy bot console, the console crash
but when i remove the code everything in the console works
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
if you don't even know how to use node, how did you code the bot
@Medusas?
dont tell me you use bare javascript to make your bot. it's impossible
i can help further if he actually sends the stacktrace, but something else is failing
ok i'll come back when he provide the stacktrace
thats what i did
i can give you an example of node's stacktrace, what you provided is something non-node failing
first i need to fix the code i messed up haha
what are you using to run your bot?
is it node.js or anything else? im asking about the environment tha run ur code
node.js is an environment where u build stuff urself
node.js