TheWebartist / dotnetcore-slackbot

.Net Core Slackbot Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.Net Core Slackbot Library

A simple slackbot library built to listen for and respond to messages.

Install

Install-Package Slackbot

Usage

var bot = new Bot("bot-token", "bot-username");

bot.OnMessage += (sender, message) =>
{
    if (message.MentionedUsers.Any(user => user == "bot-username"))
    {
        bot.SendMessage(message.Channel, "hi there, thanks for mentioning my name!");
    }
};

Nuget

https://www.nuget.org/packages/Slackbot

License

This code is provided under the under the MIT license

About

.Net Core Slackbot Library

License:MIT License


Languages

Language:C# 100.0%