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

No more auto-react

This commit is contained in:
Gregory Rudolph
2019-10-09 11:06:48 -04:00
parent 6aa1302bbe
commit 9d7ca47595

View File

@ -1,27 +0,0 @@
// +ignore
// +build type_commands autoreactcmd
package main
import (
"samhofi.us/x/keybase"
)
func init() {
command := TypeCommand{
Cmd: []string{"text"},
Name: "AutoReact",
Description: "Automatically reacts to every incoming message with an emoji",
Exec: tcmdAutoReact,
}
RegisterTypeCommand(command)
}
func tcmdAutoReact(m keybase.ChatAPI) {
msgID := m.Msg.ID
channel := m.Msg.Channel
chat := k.NewChat(channel)
chat.React(msgID, ":+1:")
}