mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 09:57:24 +00:00
Display error
This commit is contained in:
14
cmdReact.go
14
cmdReact.go
@ -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.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user