mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 11:07:22 +00:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
@ -21,13 +21,19 @@ func init() {
|
|||||||
|
|
||||||
func cmdReply(cmd []string) {
|
func cmdReply(cmd []string) {
|
||||||
chat := k.NewChat(channel)
|
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])
|
messageID, err := strconv.Atoi(cmd[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
printToView("Feed", fmt.Sprintf("There was an error determining message ID %s", cmd[1]))
|
printToView("Feed", fmt.Sprintf("There was an error determining message ID %s", cmd[1]))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
_, err = chat.Reply(messageID, strings.Join(cmd[2:], " "))
|
_, err = chat.Reply(messageID, strings.Join(cmd[2:], " "))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
printToView("Feed", "There was an error with your reply.")
|
printToView("Feed", "There was an error with your reply.")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user