Open thewilloftheshadow opened 1 week ago
@apteryxxyz Would you like to take this on?
@apteryxxyz Would you like to take this on?
I can sure
I'll do the combining of packages first in one pr, plugins and adapters can be a separate pr
For now, some notes/ideas/questions:
handleDeployCommandsRequest(req: Request)
, handleInteractionRequest(req: Request, ...)
, this is so users can still create their own routerClient#router
will be replaced* with a simple routes array, the actual routing can be handled in the adaptersSounds like a plan We can go ahead and remove the router, we’re in v0.x still
Multiple packages are a pain, and I don't like the setup
Instead, I would like to have the main imports under
@buape/carbon
and then the plugins like LinkedRoles under@buape/carbon/linkedRoles
or something, and adapters under@buape/carbon/adapters
.With this, the only packages we would have would be
@buape/carbon
,@buape/carbon-request
, andcreate-carbon
Additionally with this, add a createHandler function that takes in the env from the framework that the bot is in and mount the routes that way, adding the ability for the user to set custom routes for anything they need.
(Also as a minor detail, change the default from
/interaction
to/interactions
to match the placeholder in the dev portal)(Maintainers: see https://discord.com/channels/1280628625904894072/1283847284441878530)