#Slash commands not being removed or changed after redeployment [seems to be fixed]

50 messages · Page 1 of 1 (latest)

eager quiver
#

For some reason, when I try to deploy slash commands for my server using an empty array to remove them, my console shows that the commands have been reloaded. My bot is not removing the commands from the server, despite providing an empty array and being shown confirmation.

Here is my deployment file - https://sourceb.in/ZjKa7Rn6rj

When I supply the array of slash commands which is called commands in my code, console shows that the cmds updated, but they are not even changed no matter if I try to remove them or redeploy them in my server. I'm not sure if this has to do with REST or something with the Discord API so I thought to ask here first since I use @discordjs/rest. If this ends up having nothing to do with discord.js, I apologize and I'll ask in the ddevs server instead.

I would post a stack trace, but there is no error since my commands array logs perfectly fine.

whole folioBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

eager quiver
#

Slash commands not being removed or changed after redeployment

#

my bot shows the id option, when i have changed it to be a user option. this is just to show how even after a redeployment, the commands don't update and yes I have re-invited my bot

prisma aurora
#

unless im missing something this should be working, btw are your purposely trying to just remove all commands for testing purposes?

eager quiver
#

well no, i was trying to redeploy them and noticed that the commands didnt update so i tried to remove them to see if that was working to know if i was doing something wrong

prisma aurora
eager quiver
#

correct and yes i am doing this for testing purposes and i dont intend on doing this often

#

i thought maybe i was rate limited or something, but i got the same result from waiting over a day

prisma aurora
#

tbh looking at it im confused cause im like as far as i can tell its correct, the only things i could see but u wouldve or shouldve gotten an error for would have been wrong id's or its not reaching that section of the code and slightly skipping

eager quiver
#

thats what i thought too, but im very confused about this and im just not sure if this is me doing something wrong with registering commands, which has been working before this happened

prisma aurora
#

if u added a new command will it update to show the new one?

eager quiver
#

i have and nothing has been updated

prisma aurora
#

yeah sorry im defiantly over looking something cause it def looks like it should work, id wait till someone else might be able to look it over

eager quiver
#

appreciate you trying to help. this is honestly really confusing me lol

prisma aurora
#

im curious cause this intrigues me when you save and reload the file, to run the bot whats the console output?

eager quiver
#

logs TestBot is online and all of the slash commands and my bot are both completely functional

prisma aurora
eager quiver
#

uh no, but when i run my deploy script, i get this and thats it

prisma aurora
#

ie
'Started refreshing application (/) commands.'
'Successfully reloaded application (/) commands.'

#

is it two different scripts? one to load the application commands and one to turn the bot on?

eager quiver
#

yea i only deploy commands when i update one, add one or remove one and i use my other script to start my bot

#

i dont deploy when the bot is online

prisma aurora
#

this is prolly cause my brain aint functioning it was working this way before? or was there a change ie splitting the scripts

eager quiver
#

yea this was working completely fine before

#

i didnt have any issues with splitting the scripts

primal turtle
#

Maybe you could debug your code

eager quiver
#

what exactly would i be debugging? my array of slash commands log perfectly fine in my console so i can make sure the commands are showing updated info.

could you suggest something that i could try that i haven't done already?

#

if you read the messages above, i stated that my scripts are working fine and i show the output of my deploy script functioning normally.

im just not sure what else you expect me to do with telling me to debug without some context

primal turtle
#

Yeh, srry i forgot that debugging a put isnt really possible

#

But i wouldnt know whats going wrong

#

Are all the ids correct?

eager quiver
#

yep everything’s correct, and I do really appreciate you trying to help

eager quiver
#

it’s okay I may eventually figure this out since it’s probably me, but I’m unsure

hollow nexus
#

Are those guild or global commands? And do you deploy with put or patch call?

eager quiver
#

I deploy with put, and those are guild commands

hollow nexus
#

Did you ever deploy global commands? Or are you maybe deploying to a different guild than the one you look at to check?

eager quiver
#

I have actually tried deploying globally and that did nothing. I made sure to check the guild id about 100 times and both methods aren’t working for some reason

hollow nexus
#

Did you also check the clientID/token are for the bot you mean and not another testBot or so?

eager quiver
#

yes I even reset the token just to be sure I was deploying with the correct one

#

Honestly so confusing

hollow nexus
#

Can you do me a favor and console.log(rest.get(Routes.applicationGuildCommands(….)) after deploying the empty array (and not deploying anything else)? Also try to <Guild>.commands.fetch().then(console.log) in your bot ready and try to find out where the commands are/aren’t

eager quiver
#

sure give me a min

#

first log returned an empty array .... and now the commands are gone like i wanted them to from the beginning... maybe i was rate limited

#

let me see if deploying them works

#

now im even more confused

#

lol

#

alright well now deployment seems to also be working. gosh i have no idea what happened. i changed nothing in my code

#

i honestly feel like i wasted time to those that helped me since its working, but that's not to say that this could happen again in the future

#

Slash commands not being removed or changed after redeployment [seems to br fixed]