jammerware / margiebot

MargieBot is a .NET library designed to make building bots for Slack fast, easy, and fun.
MIT License
122 stars 42 forks source link

Added support for additional response types #10

Closed lplavoie closed 1 year ago

lplavoie commented 8 years ago

Changed the base response type to abstract BotResponse, with implementations BotMessage (existing) and BotReaction (new). This is to allow responders that simply add a reaction to an existing message

AndrewArace commented 8 years ago

Nicely done... better than my quick and dirty approach ;)

On Sun, Nov 15, 2015, 10:17 PM lplavoie notifications@github.com wrote:

Changed the base response type to abstract BotResponse, with implementations BotMessage (existing) and BotReaction (new). This is to

allow responders that simply add a reaction to an existing message

You can view, comment on, or merge this pull request online at:

https://github.com/jammerware/margiebot/pull/10 Commit Summary

  • Added logic and models to support different types of responses (for now : Add a reaction)
  • Abstract BotResponse class

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/jammerware/margiebot/pull/10.

AndrewArace commented 8 years ago

Can I make an additional suggestion? You should implement the response chains for Reactions: e.g. the existing RespondsTo chaining:

myBot.RespondsTo("Hi Margie").With("Hey, friend!");

you should also implement

myBot.ReactsTo("banana").With("banana");

lplavoie commented 8 years ago

Yes indeed! I'll see if there's a clean way to chain a mix of RespondsTo and ReactsTo also.