A package .net to send slack message by webhooks
- Made with .net 5.0;
- Using
System.text.json
(don't used NetownSoft.json); - Using FluentValidation;
Create your web hook from Slack here
- How to view the demo ?
-
Create or get you web hook url from Slack (Access the link above)
-
Only clone this repository, configure the keys in
app.config
, build and execute the console applicationSendSlackMessage.Demo
- Add link:
<https://myurl.example.com|Click here or text>
; - Break line:
\n
(This still doesn't work when write\n
withConsole.Readline
); - @channel notification:
<!channel> Hello channel!
; - @group notification:
<!group> Hello Group!
; - @here notification:
<!here> Hello!
; - @here notification:
<!everyone> Hello Everyone!
; - Override channel: Send property
Channel
(to override channel of web-hook); - Send Direct Message to user: Send Property
Channel
as@usernameDestiny
(to override channel of web-hook); - To write bold text:
*bold text*
; - To write italic text:
_italic text_
; - To write
scretchedtext:~scretched text~
; - To write without markdown (default is true): Sned property
Markdown = false
;