private ads for nsfw
This commit is contained in:
12
main.go
12
main.go
@ -87,7 +87,7 @@ func run(c *cli.Context) error {
|
|||||||
if c.String("owner") != "" {
|
if c.String("owner") != "" {
|
||||||
b.Meta["owner"] = c.String("owner")
|
b.Meta["owner"] = c.String("owner")
|
||||||
}
|
}
|
||||||
if c.String("kbstore-team") != "" {
|
if c.String("kvstore-team") != "" {
|
||||||
b.Meta["kvstore"] = c.String("kvstore-team")
|
b.Meta["kvstore"] = c.String("kvstore-team")
|
||||||
loadNsfwAllowed(b)
|
loadNsfwAllowed(b)
|
||||||
}
|
}
|
||||||
@ -102,6 +102,7 @@ func run(c *cli.Context) error {
|
|||||||
keybasebot.BotCommand{
|
keybasebot.BotCommand{
|
||||||
Name: "ping",
|
Name: "ping",
|
||||||
Ad: &cmd.PingAd,
|
Ad: &cmd.PingAd,
|
||||||
|
AdType: "public",
|
||||||
Run: keybasebot.Adapt(
|
Run: keybasebot.Adapt(
|
||||||
cmd.SendPong,
|
cmd.SendPong,
|
||||||
keybasebot.MessageType("text"),
|
keybasebot.MessageType("text"),
|
||||||
@ -111,6 +112,7 @@ func run(c *cli.Context) error {
|
|||||||
keybasebot.BotCommand{
|
keybasebot.BotCommand{
|
||||||
Name: "age",
|
Name: "age",
|
||||||
Ad: &cmd.AgeAd,
|
Ad: &cmd.AgeAd,
|
||||||
|
AdType: "public",
|
||||||
Run: keybasebot.Adapt(
|
Run: keybasebot.Adapt(
|
||||||
cmd.Age,
|
cmd.Age,
|
||||||
keybasebot.MessageType("text"),
|
keybasebot.MessageType("text"),
|
||||||
@ -120,6 +122,7 @@ func run(c *cli.Context) error {
|
|||||||
keybasebot.BotCommand{
|
keybasebot.BotCommand{
|
||||||
Name: "convert",
|
Name: "convert",
|
||||||
Ad: &cmd.ConvertAd,
|
Ad: &cmd.ConvertAd,
|
||||||
|
AdType: "public",
|
||||||
Run: keybasebot.Adapt(
|
Run: keybasebot.Adapt(
|
||||||
cmd.Convert,
|
cmd.Convert,
|
||||||
keybasebot.MessageType("text"),
|
keybasebot.MessageType("text"),
|
||||||
@ -129,6 +132,7 @@ func run(c *cli.Context) error {
|
|||||||
keybasebot.BotCommand{
|
keybasebot.BotCommand{
|
||||||
Name: "price",
|
Name: "price",
|
||||||
Ad: &cmd.PriceAd,
|
Ad: &cmd.PriceAd,
|
||||||
|
AdType: "public",
|
||||||
Run: keybasebot.Adapt(
|
Run: keybasebot.Adapt(
|
||||||
cmd.SendPrice,
|
cmd.SendPrice,
|
||||||
keybasebot.MessageType("text"),
|
keybasebot.MessageType("text"),
|
||||||
@ -137,9 +141,11 @@ func run(c *cli.Context) error {
|
|||||||
},
|
},
|
||||||
keybasebot.BotCommand{
|
keybasebot.BotCommand{
|
||||||
Name: "nsfw",
|
Name: "nsfw",
|
||||||
Ad: nil,
|
Ad: &cmd.NsfwAd,
|
||||||
|
AdType: "teammembers",
|
||||||
|
AdTeamName: c.String("kvstore-team"),
|
||||||
Run: keybasebot.Adapt(
|
Run: keybasebot.Adapt(
|
||||||
setNsfw,
|
cmd.SetNsfw,
|
||||||
keybasebot.MessageType("text"),
|
keybasebot.MessageType("text"),
|
||||||
keybasebot.CommandPrefix("!nsfw"),
|
keybasebot.CommandPrefix("!nsfw"),
|
||||||
keybasebot.FromUser(c.String("owner")),
|
keybasebot.FromUser(c.String("owner")),
|
||||||
|
|||||||
Reference in New Issue
Block a user