#discord.js v14 - Bot commands not responding

36 messages · Page 1 of 1 (latest)

limber wyvern
#

Hi, I'm using discord.js v14. I deployed my bot but none of the commands respond when I use them in the server. My code is attached below. Could someone help me figure out what’s wrong?

void lightBOT
narrow sable
limber wyvern
#

Slash

frigid talon
#

also the actual code itself

ancient kindle
#

do you have an interactionCreate event?

limber wyvern
#

After using all the slash commands, the bot application says it stopped responding.

limber wyvern
ancient kindle
#

what?

frigid talon
#

share the code, you said "My code is attached below" but didn't actually send anything

#

otherwise we can only speculate on what you have and what you don't

ancient kindle
#

do you know what an event listener is?

limber wyvern
#

@frigid talon

frigid talon
#

you shouldn't deploy on every start, that'll easily get you ratelimited

#

but it shouldn't cause what you say

#

it looks fine, try placing logs starting from the top of your interactionCreate listener

#

and see where it stops logging

#

also you usually shouldn't completely ignore errors (.catch(()=>{});) unless you have a really good reason to do so and it isn't expected to cause issues

#

in this case if deferReply somehow errors it will cause an issue because you use editReply afterwards, if the defer errored it didn't send a reply, so an edit would error

#

and you should really make your command handlers in separate functions or at least in separate lines, not really long unreadable one-liners

limber wyvern
#

Ok ill try thx

limber wyvern
frigid talon
#

that's not related to djs, that's a railway error

#

I don't know how railway works so I can't really help you

limber wyvern
limber wyvern
frigid talon
#

you should share the error which I don't have

limber wyvern
frigid talon
#

your duration used to be a string option, then you deployed commands, then changed it to integer but did not deploy again

#

it's still a string option in discord

limber wyvern
#

Yes, I did what you said and it solved the problem, but now it's giving a "member not found" error.
2026-02-26T20:36:18.481332055Z [inf] Starting Container
2026-02-26T20:36:20.754818268Z [inf] [ONLINE] OM Bot#2439 is running on Railway! 🚀
2026-02-26T20:36:20.754826796Z [inf] [SYSTEM] Commands registered successfully!
2026-02-26T20:36:20.754832256Z [err] (node:60) DeprecationWarning: The ready event has been renamed to clientReady to distinguish it from the gateway READY event and will only emit under that name in v15. Please use clientReady instead.
2026-02-26T20:36:20.754832622Z [inf] > [email protected] start
2026-02-26T20:36:20.754841836Z [err] npm warn config production Use --omit=dev instead.
2026-02-26T20:36:20.754846954Z [inf] > node index.js
2026-02-26T20:36:20.754856784Z [inf]
2026-02-26T20:36:20.754859402Z [inf]
2026-02-26T20:36:20.754988465Z [err] npm warn config production Use --omit=dev instead.
2026-02-26T20:36:20.754993162Z [inf]
2026-02-26T20:36:20.754997579Z [inf] > [email protected] deploy
2026-02-26T20:36:20.755001825Z [inf] > node deploy-commands.js
2026-02-26T20:36:20.755006958Z [inf]
2026-02-26T20:36:20.755012601Z [inf] [SYSTEM] Registering 24 commands...
2026-02-26T20:36:20.755135536Z [err] (Use node --trace-deprecation ... to show where the warning was created)
2026-02-26T20:37:23.243038104Z [err] (node:60) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.

cyan mountain