Skip to content

Instantly share code, notes, and snippets.

@glennblock
Last active June 29, 2016 02:26
Show Gist options
  • Save glennblock/8bab71fb01ddd26e09127aba2d41d02a to your computer and use it in GitHub Desktop.
Save glennblock/8bab71fb01ddd26e09127aba2d41d02a to your computer and use it in GitHub Desktop.
using SlackAPI;
var client = new SlackSocketClient("[SLACK_TOKEN]");
client.Connect((connected) =>{}, () =>{
Console.WriteLine("Connected");
client.PostMessage(
resp => {
Console.WriteLine("Posted");
},
"[CHANNEL]",
"Hello Slack from scriptcs"
);
});
Console.ReadLine();
@glennblock
Copy link
Author

glennblock commented Jun 29, 2016

Before running this, do "scriptcs install slackapi". Replace [SLACK_TOKEN] with your API token and replace [channel] with the channel you want to post to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment