Is there a way to combine the framework with my own decorator system?

22 Replies
Favna
Favna9mo ago
No shot we actually got someone with the april fools name of the server :omegalul: Anyway, no there is not. DiscordJS is the only API library we support. Unless I misunderstand what you mean with "system" here
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
I didnt fall for it, i just wanted to mess with others too i was working on my decorators and im trying to get Command.LoaderContext
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
this is the command
No description
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
dont worryu about the "target.prototype"
No description
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
im trying to figure out how to pass the the context when thedecorator is used
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
No description
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
same with Listener.LoaderContext
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
GitHub
Kuramisa/src/classes at sapphire · Kuramisa/Kuramisa
Contribute to Kuramisa/Kuramisa development by creating an account on GitHub.
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
reference for the classes If you have any ideas pls @ me, if you dont mind telling me in short when and how does the LoaderContext works, like when it gets passed, is it static, how it works somewhat. you can send me links to the sources, cuz i cant find them properly. i can incorporate it myself if i understand it. Alright everything works besides one t hing For some reason ApplicationCommandRegistry always thinks that there are differences inin the command versus api data Which causes my bot to hit the ratelimit
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
No description
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
and context menus broke too
No description
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
the problem is that, i also can't pass the builder cuz it gives me errors upon registering the commands
No description
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
These are the errors
No description
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
but yeah pls @ me if u have any answers, thank you :3 Anyone?🥺
Favna
Favna9mo ago
You can see that we can access the constructor parameters just fine here: https://github.com/sapphiredev/utilities/blob/main/packages/decorators/src/piece-decorators.ts
GitHub
utilities/packages/decorators/src/piece-decorators.ts at main · sa...
Common JavaScript utilities for your TypeScript projects - sapphiredev/utilities
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
Thats not the problem anymore, i can access them and it works perfectly, but theres a problem of command miscomparison where, passing the builders where i showed above doesnt give commands correct names on the context menus and it g ivecs me the errors i mentiond above
čamdžić
čamdžić9mo ago
https://discord.com/channels/737141877803057244/759750007087431721/1353374650377175040 No offense, but looking at your code and the code from the sapphire decorator for ApplyOptions, literally both yours and ApplyOptions do the same thing, so I don't see the point of all this @SlashCommands({}) - creates a constructor based on the options you put in @ApplyOptions({}) - also creates a constructor based on the options you put in It's just that your "framework" automatically registers the commands as far as I can see while sapphire gives us the control for that
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
No offense taken, but thats not what i asked
čamdžić
čamdžić9mo ago
Yes, but I don't think anyone can understand what you're trying to do, you're using the @sapphire/framework package on your "framework" as far as I understand and you're trying to make it work as you see fit I don't understand how anyone can help you in the sapphire support channel for your own framework...
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
Im not making my own framework, im using sapphire to integrate my own decorators to sapphire itself I provided screenshots where it shows the errors and how i register the commands Its mistakengly says that there are differences between commands versua api data where its not and then spams the API causing me to hit ratelimit
Favna
Favna9mo ago
Closing this in favour of #Command comparison bevwuse theres no need to have 2 threads.
⛧☾Azrael☽⛧
⛧☾Azrael☽⛧OP9mo ago
thats fine

Did you find this page helpful?