| 1 | package slack |
| 2 | |
| 3 | // DividerBlock for displaying a divider line between blocks (similar to <hr> tag in html) |
| 4 | // |
| 5 | // More Information: https://api.slack.com/reference/messaging/blocks#divider |
| 6 | type DividerBlock struct { |
| 7 | Type MessageBlockType `json:"type"` |
| 8 | BlockID string `json:"block_id,omitempty"` |
| 9 | } |
| 10 | |
| 11 | // BlockType returns the type of the block |
| 12 | func (s DividerBlock) BlockType() MessageBlockType { |
| 13 | return s.Type |
| 14 | } |
| 15 | |
| 16 | // NewDividerBlock returns a new instance of a divider block |
| 17 | func NewDividerBlock() *DividerBlock { |
| 18 | return &DividerBlock{ |
| 19 | Type: MBTDivider, |
| 20 | } |
| 21 | |
| 22 | } |