underctrl-io / commandkit

Only focus on what matters - Let CommandKit handle your commands and events in your Discord.js projects!
https://commandkit.js.org
MIT License
91 stars 11 forks source link

Commands Won't Register #76

Open RohanDaCoder opened 3 months ago

RohanDaCoder commented 3 months ago

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

zwolinskidominik commented 2 months ago

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.

RohanDaCoder commented 2 months ago

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

zwolinskidominik commented 2 months ago

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