Created
November 19, 2021 02:22
-
-
Save loloDawit/87a0a63a54c1c818930facb7b555859b to your computer and use it in GitHub Desktop.
Slack Format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
response: (color, msg, extra) => { | |
return { | |
attachments: [ | |
{ | |
fallback: "Fallback triggered", | |
color: `${color}`, | |
blocks: [ | |
{ | |
type: "section", | |
text: { | |
type: "mrkdwn", | |
text: `${msg}` | |
} | |
}, | |
{ | |
type: "context", | |
elements: [ | |
{ | |
type: "mrkdwn", | |
text: `${extra}` | |
} | |
] | |
} | |
] | |
} | |
] | |
}; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment