Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components can't have custom constructors #213

Open
thewilloftheshadow opened this issue Jan 22, 2025 · 0 comments
Open

Components can't have custom constructors #213

thewilloftheshadow opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@thewilloftheshadow
Copy link
Member

This is more of a design flaw than anything else...

Right now, components aren't instantiated when passed to a Command class, the component handler actually is the one who calls it new ButtonComponent(), meaning that you can't pass in any custom data to the constructor.

Carbon gives the illusion that you can, because you can pass it when you instantiate it when you call it within a reply() function (e.g. to serialize), but it doesn't work within Carbon itself.

@thewilloftheshadow thewilloftheshadow added the bug Something isn't working label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant