frozor-slack-attachments
No dependencies.
const {Attachment} = require('frozor-slack-attachments')
To set a property, run set$CapitalizedPropertyName
, for instance setTitle
or setText
or setFooterIcon
. Can be chained.
To get a property, do the same thing but with get
, for instance getTitle
.
To add a field to an attachment, call addField(obj)
, and to completely replace fields, call setFields(obj)
All properties can be seen in config/index.js
. They are split at _
and then each part is capitalized, turning footer_icon
into FooterIcon
or title
into Title
.