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.
25 lines
456 B
25 lines
456 B
5 years ago
|
// +build type_commands autoreactcmd
|
||
|
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"samhofi.us/x/keybase"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
command := TypeCommand{
|
||
|
Cmd: []string{"text"},
|
||
|
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:")
|
||
|
}
|