buape / carbon

A fully-featured HTTP library for Discord bots
https://carbon.buape.com/
MIT License
9 stars 5 forks source link

Plugins Architecture + Better Adapters #99

Open thewilloftheshadow opened 1 week ago

thewilloftheshadow commented 1 week ago

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, and create-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)

thewilloftheshadow commented 1 week ago

@apteryxxyz Would you like to take this on?

apteryxxyz commented 1 week ago

@apteryxxyz Would you like to take this on?

I can sure

apteryxxyz commented 1 week ago

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:

thewilloftheshadow commented 1 week ago

Sounds like a plan We can go ahead and remove the router, we’re in v0.x still