Looking for Feedback on a little project of mine
Hey guys ! I hope you are all doing well ! I am working a little project of mine that consists of modifying the way DJS commands are built and what not and I'd like some feedback on it. (more in the post)
6 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!so my idea is writing a new way of making discord JS commands. It would go like this:
`
Of course I am not inventing much with that as DJS already supports the raw JSON object, but what do you guys think about the function call
Of course, it could be async and there is no need to write interaction.reply() to reply to it
None of what I am saying right now exists (atleast as far as I know) it's just a little idea I'd like to have feedback on if a soul sees this 😌
Btw, for mods, if it ain't the right channel, just to tell me and I'll move it. ^.^
I gotta this idea while I was messing up with the ASTs DJS commands were generating and just thought why not
Hmm, so the return would be used as a call to interaction.reply?
Yes
It’s an interesting concept, but I think it would be a bit confusing when you also defer the reply first or have some intermediary reply in this file itself, have you already thought how to go about that?
I was thinking about checking if the command was already deferred, it's all just theory now but basically have multiple things in between to perform various checks :cooldoge:
there are surely going to be some edge cases and race conditions due to async but I'm pretty sure I can make it work
Showing modals are something that I am gonna take care of a bit later on ! but basically showing a modal right now (in my head) isn't any different than how you do it with Discord.js (it is fully compatible with djs)
I was also thinking of making another way to make modals (integrating a jsx way kind of stuff ^.^)
the same would go for embedded of course
Also, one of the features I'd like to make (but that's on me) I'm a huge fan of Next JS API routes kind of stuff and I'd like to try to make a file based command kinda stuff
so instead of declaring sub commands within a file they'd be file based ^.^ (no clue how I am gonna achieve that yet but I have high hopes) of course, it'll still remain and based on DJS and that is a very important point
so a modal with my mental model that would be along
I am sorry, my brain is slow, but if you meant it in the way of "is it only ever gonna reply" ex: interaction.reply then most likely not, I'd like to come up with a smart way of inferring reply types
You'd think that'd be a bad idea :think:
I'm interested in everybody thoughts !
Alright noted, any particular reasons ? is it that you just don't like the idea of that in a NodeApp or something else
may it be performance, usability or else ^.^
Oh, yes, that makes total sense, I'm just in the process of thinking how to do things right now so your feedback is really useful ^.^
but what do you think about a file based systems for commands and events ?
I'm digging the idea more and more
I see I see, thank you so much for the feedback it helps a lot !