Jammerware edited this page Aug 6, 2016 · 21 revisions

Welcome to MargieBot

MargieBot is a simple bot framework for Slack, one of the coolest free chat and collaboration web applications around. MargieBot is written in C#.NET, and it's designed to make creating bots for Slack accessible to anyone who knows a little C# or VB and has a vision for bot interactions that are fun or helpful - sometimes even both.


MargieBot is designed to be easy to understand, quick to get started with, and fun to use.

var myBot = new Bot();
myBot.RespondsTo("Hi Margie").With("Hey, friend!");
myBot.Connect("<your bot's slack API token>");

Flexible & Powerful

If you can write it in C# or VB, MargieBot can bring it to life in Slack. Want to call a coworker a scruffy-looking nerf-herder every time he says the phrase "technical debt" in a public channel, but only if it's at the bottom of the hour? MargieBot has your back.

public class TechDebtResponder : IResponder
        public bool CanRespond(ResponseContext context)
                Regex.IsMatch(context.Message.Text, "\btechnical debt\b") &&
                context.Message.ChatHub.Type == SlackChatHubType.Channel &&
                context.UserNameCache[context.Message.User] == "obnoxious coworker" &&
                DateTime.Now.Minute > 30;

        public BotMessage GetResponse(ResponseContext context)
            return new BotMessage() {
                Text = "God, " + context.Message.FormattedUser + ", you're such a scruffy-looking nerf-herder.";

myBot.Responders.Add(new TechDebtResponder());

To get started, check out our guide on configuring MargieBot's responses, our tips and tricks, or, if you're brand new to Slack and its bots, MargieBot from the ground up.

Thanks for checking out MargieBot!

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.