Closed lplavoie closed 1 year 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
- M MargieBot.ExampleResponders/Responders/DefineResponder.cs https://github.com/jammerware/margiebot/pull/10/files#diff-0 (7)
- M MargieBot.ExampleResponders/Responders/ScoreResponder.cs https://github.com/jammerware/margiebot/pull/10/files#diff-1 (7)
- M MargieBot.ExampleResponders/Responders/ScoreboardRequestResponder.cs https://github.com/jammerware/margiebot/pull/10/files#diff-2 (7)
- M MargieBot.ExampleResponders/Responders/WeatherRequestResponder.cs https://github.com/jammerware/margiebot/pull/10/files#diff-3 (7)
- M MargieBot.ExampleResponders/Responders/WhatsNewResponder.cs https://github.com/jammerware/margiebot/pull/10/files#diff-4 (7)
- M MargieBot.ExampleResponders/Responders/WikipediaResponder.cs https://github.com/jammerware/margiebot/pull/10/files#diff-5 (7)
- M MargieBot.Tests/ResponderTests.cs https://github.com/jammerware/margiebot/pull/10/files#diff-6 (2)
- M MargieBot.sln https://github.com/jammerware/margiebot/pull/10/files#diff-7 (12)
- M MargieBot/Bot.cs https://github.com/jammerware/margiebot/pull/10/files#diff-8 (72)
- M MargieBot/MargieBot.csproj https://github.com/jammerware/margiebot/pull/10/files#diff-9 (4)
- M MargieBot/Models/BotMessage.cs https://github.com/jammerware/margiebot/pull/10/files#diff-10 (2)
- A MargieBot/Models/BotReaction.cs https://github.com/jammerware/margiebot/pull/10/files#diff-11 (23)
- A MargieBot/Models/BotReactionType.cs https://github.com/jammerware/margiebot/pull/10/files#diff-12 (9)
- A MargieBot/Models/BotResponse.cs https://github.com/jammerware/margiebot/pull/10/files#diff-13 (6)
- A MargieBot/Models/BotResponseType.cs https://github.com/jammerware/margiebot/pull/10/files#diff-14 (8)
- M MargieBot/Models/SlackMessage.cs https://github.com/jammerware/margiebot/pull/10/files#diff-15 (4)
- M MargieBot/Responders/IResponder.cs https://github.com/jammerware/margiebot/pull/10/files#diff-16 (3)
- M MargieBot/Responders/SimpleResponder.cs https://github.com/jammerware/margiebot/pull/10/files#diff-17 (7)
Patch Links:
- https://github.com/jammerware/margiebot/pull/10.patch
- https://github.com/jammerware/margiebot/pull/10.diff
— Reply to this email directly or view it on GitHub https://github.com/jammerware/margiebot/pull/10.
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");
Yes indeed! I'll see if there's a clean way to chain a mix of RespondsTo and ReactsTo also.
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