summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/slack-go/slack/block_divider.go
blob: 2d442ba118db4f7b0190614ce4acdd89220db6da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package slack

// DividerBlock for displaying a divider line between blocks (similar to <hr> tag in html)
//
// More Information: https://api.slack.com/reference/messaging/blocks#divider
type DividerBlock struct {
	Type    MessageBlockType `json:"type"`
	BlockID string           `json:"block_id,omitempty"`
}

// BlockType returns the type of the block
func (s DividerBlock) BlockType() MessageBlockType {
	return s.Type
}

// NewDividerBlock returns a new instance of a divider block
func NewDividerBlock() *DividerBlock {
	return &DividerBlock{
		Type: MBTDivider,
	}

}