Browse Source

Merge remote-tracking branch 'upstream/dev' into dev

pull/21/head
David Haukeness 5 years ago
parent
commit
ebd1be8b4e
No known key found for this signature in database
GPG Key ID: A7F1091956853EF9
  1. 6
      cmdReply.go

6
cmdReply.go

@ -21,13 +21,19 @@ func init() { @@ -21,13 +21,19 @@ func init() {
func cmdReply(cmd []string) {
chat := k.NewChat(channel)
if len(cmd) < 2 {
printToView("Feed", fmt.Sprintf("%sreply $ID - Reply to message $ID", cmdPrefix))
return
}
messageID, err := strconv.Atoi(cmd[1])
if err != nil {
printToView("Feed", fmt.Sprintf("There was an error determining message ID %s", cmd[1]))
return
}
_, err = chat.Reply(messageID, strings.Join(cmd[2:], " "))
if err != nil {
printToView("Feed", "There was an error with your reply.")
return
}
return
}

Loading…
Cancel
Save