This commit is contained in:
David Haukeness
2021-01-15 14:30:47 -07:00
parent 6780b36393
commit a1a508e127

24
main.go
View File

@ -31,22 +31,38 @@ func main() {
keybasebot.BotCommand{ keybasebot.BotCommand{
Name: "ping", Name: "ping",
Ad: &cmd.PingAd, Ad: &cmd.PingAd,
Run: keybasebot.Adapt(cmd.SendPong, keybasebot.MessageType("text"), keybasebot.CommandPrefix("!ping")), Run: keybasebot.Adapt(
cmd.SendPong,
keybasebot.MessageType("text"),
keybasebot.CommandPrefix("!ping")
),
}, },
keybasebot.BotCommand{ keybasebot.BotCommand{
Name: "age", Name: "age",
Ad: &cmd.AgeAd, Ad: &cmd.AgeAd,
Run: keybasebot.Adapt(cmd.Age, keybasebot.MessageType("text"), keybasebot.CommandPrefix("!age")), Run: keybasebot.Adapt(
cmd.Age,
keybasebot.MessageType("text"),
keybasebot.CommandPrefix("!age")
),
}, },
keybasebot.BotCommand{ keybasebot.BotCommand{
Name: "convert", Name: "convert",
Ad: &cmd.ConvertAd, Ad: &cmd.ConvertAd,
Run: keybasebot.Adapt(cmd.Convert, keybasebot.MessageType("text"), keybasebot.CommandPrefix("!convert")), Run: keybasebot.Adapt(
cmd.Convert,
keybasebot.MessageType("text"),
keybasebot.CommandPrefix("!convert")
),
}, },
keybasebot.BotCommand{ keybasebot.BotCommand{
Name: "price", Name: "price",
Ad: &cmd.PriceAd, Ad: &cmd.PriceAd,
Run: keybasebot.Adapt(cmd.SendPrice, keybasebot.MessageType("text"), keybasebot.CommandPrefix("!price")), Run: keybasebot.Adapt(
cmd.SendPrice,
keybasebot.MessageType("text"),
keybasebot.CommandPrefix("!price")
),
}, },
) )
// if there are reddit credentials add the reddit commands // if there are reddit credentials add the reddit commands