mirror of https://github.com/Rudi9719/kbtui.git
Sam
5 years ago
1 changed files with 25 additions and 0 deletions
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
// +ignore
|
||||
// +build type_commands showreactionscmd
|
||||
|
||||
package main |
||||
|
||||
import ( |
||||
"fmt" |
||||
|
||||
"samhofi.us/x/keybase" |
||||
) |
||||
|
||||
func init() { |
||||
command := TypeCommand{ |
||||
Cmd: []string{"reaction"}, |
||||
Name: "ShowReactions", |
||||
Description: "Prints a message in the feed any time a reaction is received", |
||||
Exec: tcmdShowReactions, |
||||
} |
||||
|
||||
RegisterTypeCommand(command) |
||||
} |
||||
|
||||
func tcmdShowReactions(m keybase.ChatAPI) { |
||||
printToView("Feed", fmt.Sprintf("%s reacted to %d with %s", m.Msg.Sender.Username, m.Msg.Content.Reaction.M, m.Msg.Content.Reaction.B)) |
||||
} |
Loading…
Reference in new issue