Skip to content

allow compiling different sections to Object #124

Open
@roopakv

Description

@roopakv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions