From 56ac276b1b860f46d65592147c0724195e023568 Mon Sep 17 00:00:00 2001 From: David Haukeness Date: Thu, 14 Jan 2021 14:18:36 -0700 Subject: [PATCH] command template --- cmd/template.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 cmd/template.md diff --git a/cmd/template.md b/cmd/template.md new file mode 100644 index 0000000..2a58a4b --- /dev/null +++ b/cmd/template.md @@ -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 +}