From 22bca5bf4d11e3f086fc6f7d09ea358d46942568 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Tue, 19 Dec 2017 13:42:30 -0500 Subject: [PATCH] picker: less strict (no command) --- plugins/picker/picker.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/picker/picker.go b/plugins/picker/picker.go index 7b0c3a7..93bc237 100644 --- a/plugins/picker/picker.go +++ b/plugins/picker/picker.go @@ -34,10 +34,6 @@ func rollDie(sides int) int { // This function returns true if the plugin responds in a meaningful way to the users message. // Otherwise, the function returns false and the bot continues execution of other plugins. func (p *PickerPlugin) Message(message msg.Message) bool { - if !message.Command { - return false - } - body := message.Body pfx, sfx := "pick {", "}" @@ -46,7 +42,7 @@ func (p *PickerPlugin) Message(message msg.Message) bool { items := strings.Split(body, ",") item := items[rand.Intn(len(items))] - out := fmt.Sprintf("I've chosen \"%s\" for you.", item) + out := fmt.Sprintf("I've chosen \"%s\" for you.", strings.TrimSpace(item)) p.Bot.SendMessage(message.Channel, out)