moved ping to command package

This commit is contained in:
David Haukeness
2021-01-14 11:15:06 -07:00
parent 6504452580
commit 44121c2bc5
4 changed files with 20 additions and 7 deletions

18
cmd/ping.go Normal file
View File

@ -0,0 +1,18 @@
package cmd
import (
"github.com/kf5grd/keybasebot"
"samhofi.us/x/keybase/v2/types/chat1"
)
var PingAd = chat1.UserBotCommandInput{
Name: "ping",
Usage: "Replies with Pong!",
Description: "You say ping, i say pong!",
}
func SendPong(m chat1.MsgSummary, b *keybasebot.Bot) (bool, error) {
b.KB.SendMessageByConvID(m.ConvID, "Pong!")
b.Logger.Info("ping rx in convid %s", m.ConvID)
return true, nil
}