1
0
mirror of https://github.com/Rudi9719/kbtui.git synced 2026-03-22 15:37:23 +00:00

Display error

This commit is contained in:
Gregory Rudolph
2019-10-04 12:40:06 -04:00
parent 5735baf72c
commit aa2188e858

View File

@ -25,12 +25,16 @@ func cmdReact(cmd []string) {
} }
func reactToMessage(reaction string) { func reactToMessage(reaction string) {
chat := k.NewChat(channel) doReact(lastMessage.ID, reaction)
chat.React(lastMessage.ID, reaction)
} }
func reactToMessageId(messageId string, reaction string) { func reactToMessageId(messageId string, reaction string) {
chat := k.NewChat(channel)
ID, _ := strconv.Atoi(messageId) ID, _ := strconv.Atoi(messageId)
chat.React(ID, reaction) doReact(ID, reaction)
}
func doReact(messageId int, reaction string) {
chat := k.NewChat(channel)
_, err := chat.React(messageId, reaction)
if err != nil {
printToView("Feed", "There was an error reacting to the message.")
}
} }