You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
495 B

// +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, ":sunglasses:")
}