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

allow compiling different sections to Object #124

Open
roopakv opened this issue Nov 6, 2023 · 0 comments
Open

allow compiling different sections to Object #124

roopakv opened this issue Nov 6, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@roopakv
Copy link

roopakv commented Nov 6, 2023

Is your feature request related to a problem? Please describe.
A common example of how we use this library is replacing a block on an existing message. To do this, i have to construct a whole new message rather than construct the block alone. The case this happens is when we send a large message with a button, when we respond we want to replace the actions section alone. But to do that I don't want to construct a message

Describe the solution you'd like
Currently

const blocksToAppend = Message().blocks(Blocks.Section().text('The button was clicked')).buildToObject().blocks?.[0]

Proposed

const blocksToAppend = Blocks.Section().text('The button was clicked').buildToObject()

Describe alternatives you've considered
Use the message method mentioned above

Additional context
Add any other context or screenshots about the feature request here.

@roopakv roopakv added the enhancement New feature or request label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant