commandkit icon indicating copy to clipboard operation
commandkit copied to clipboard

Commands Won't Register

Open RohanDaCoder opened this issue 1 year ago • 3 comments

My new commands stopped being registering. Old commands work if ran. My bulk register option is set to true in my commandkit config (if that helps)

It doesn't even show the loaded commands console log.. ✅ Loaded 3 developer commands in guild "Lean Development". ✅ Loaded 80 global commands.

Those messages don't even show. It works on my machine but when i upload the code to my server to run on the production bot, it doesnt work..

My discord: rohan_ohio

RohanDaCoder avatar Jul 03 '24 12:07 RohanDaCoder

Try to clear commands in your index.js

const { REST, Routes } = require('discord.js')

const rest = new REST({ version: "10" }).setToken(TOKEN);

console.log("Clearing commands...");

rest
  .put(Routes.applicationCommands(CLIENT_ID), { body: [] })
  .then(() => console.log("Commands cleared."))
  .catch(console.error);

And second solution is changing your bulkRegister to false.

zwolinskidominik avatar Jul 16 '24 09:07 zwolinskidominik

i did set the bulk register off, It still doesn't work... but then i registered the commands manually just like commandkit (client.application.commands.set()) and it seemed to work...

So i will stop using commandkit.... I am tired of fixing this issue

RohanDaCoder avatar Jul 17 '24 02:07 RohanDaCoder

Did you have new commands in the same directory as you set in your CommandKit instance "commandsPath: 'path/to/cmds'"?

zwolinskidominik avatar Jul 17 '24 10:07 zwolinskidominik

did u fix this? I have same problem

krouskystepan avatar Jan 10 '25 01:01 krouskystepan

could be due to commands comparison

twlite avatar Feb 16 '25 14:02 twlite