ClicksCodes / haiku

Discord.JS Custom Client
2 stars 0 forks source link

A lot of stuff breaks command registration; it shouldn't #6

Open Minion3665 opened 2 years ago

Minion3665 commented 2 years ago

We might want to rewrite the builder to automatically validate and also avoid the rather janky command builder syntax, although this will break full compatability with discord.js I think it could be worth it for nicer registration syntax & the same syntax across commands and subcommands. The old way of registering commands would still work, assuming you didn't use our 'registerCommandsIn' method (which we're hoping everyone will), but you wouldn't be able to use it in the file exports without writing your own handler.

We could also attempt to make both compatable, but this includes doing validation for both systems which is far less elegant and provides extra complexity to maintain, as well as the fact that permitting people to use either makes it much more likely that they'll use a mixture of both which, for obvious reasons, is not preferable.

@TheCodedProf, @PineaFan can you two weigh in on this please; do you like the djs command and subcommand builders or do you think I can do a better job?

Minion3665 commented 2 years ago

(Apologies also for the double ping; I accidentally created this over at clicksminuteper/nucleus#1 and had to delete it)

PineaFan commented 2 years ago

I'm fine with your method, the d.js compatible one is a tad janky

PineaFan commented 2 years ago

Option for adding files as multiple choice args of a command could also be helpful

Custom builder is also preferred for consistency

Minion3665 commented 2 years ago

Option for adding files as multiple choice args of a command could also be helpful

Custom builder is also preferred for consistency

+1 will build this then; we probably won't do our own checking on djs command builders, however if there's a single point where we can add checks to add them to both I may well add them there rather than earlier in the code