You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I was trying to create a block message where I want to dynamically set a MsgBlock to sent over to the channel. Like below
for _, ami := range getAmiList {
actionBlock = slack.NewActionBlock(ami, chooseBtnEle)
msg = slack.MsgOptionBlocks(
headerSection,
fieldsSection,
actionBlock,
)
}
I am not able to iterate and create blocks with each ami details in MsgOptionBlocks section . Tried append but it only works with slices, not sure how to iterate and get all ami section blocks. any help is appreciated
The output I am getting is something like this in slack:
@JinoArch I am not sure what you code looks like, or what AMI is supposed to be but you make a []slack.Blocks and store the actionBlocks using append and then append them to the MsgOptionBlocks using the spread operator.
Hello
I was trying to create a block message where I want to dynamically set a MsgBlock to sent over to the channel. Like below
I am not able to iterate and create blocks with each ami details in MsgOptionBlocks section . Tried append but it only works with slices, not sure how to iterate and get all ami section blocks. any help is appreciated
The output I am getting is something like this in slack:
expecting something like this in slack:
The text was updated successfully, but these errors were encountered: