From c4478ccd92f03741462fb4e738dd5a46b9f4739c Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Mon, 7 Oct 2019 13:37:39 -0400 Subject: [PATCH] Spaces in reactions when ID is supplied --- cmdReact.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmdReact.go b/cmdReact.go index 4ba71f2..1702cef 100644 --- a/cmdReact.go +++ b/cmdReact.go @@ -2,7 +2,10 @@ package main -import "strconv" +import ( + "strconv" + "strings" +) func init() { command := Command{ @@ -16,8 +19,8 @@ func init() { } func cmdReact(cmd []string) { - if len(cmd) == 3 { - reactToMessageId(cmd[1], cmd[2]) + if len(cmd) > 3 { + reactToMessageId(cmd[1], strings.Join(cmd[2:], " ")) } else if len(cmd) == 2 { reactToMessage(cmd[1]) }