move nsfw to command package

This commit is contained in:
David Haukeness
2021-01-16 13:02:19 -07:00
parent 4336026a5b
commit 942c8008b2

View File

@ -1,4 +1,4 @@
package main package cmd
import ( import (
"github.com/kf5grd/keybasebot" "github.com/kf5grd/keybasebot"
@ -6,7 +6,13 @@ import (
"samhofi.us/x/keybase/v2/types/chat1" "samhofi.us/x/keybase/v2/types/chat1"
) )
func setNsfw(m chat1.MsgSummary, b *keybasebot.Bot) (bool, error) { var NsfwAd = chat1.UserBotCommandInput{
Name: "nsfw",
Usage: "<add/del> <here,convid>",
Description: "Enables or Disables NSFW commands for conversations",
}
func SetNsfw(m chat1.MsgSummary, b *keybasebot.Bot) (bool, error) {
b.KB.SendMessageByConvID(m.ConvID, "Pong!") b.KB.SendMessageByConvID(m.ConvID, "Pong!")
b.Logger.Info("owner command in convid %s", m.ConvID) b.Logger.Info("owner command in convid %s", m.ConvID)
return true, nil return true, nil