Browse Source

Add AdvertiseCommand example to docs

main
Sam 5 years ago
parent
commit
7263387124
  1. 20
      docs_test.go

20
docs_test.go

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
package keybase
func ExampleKeybase_AdvertiseCommand() {
var k = NewKeybase()
// Clear out any previously advertised commands
k.ClearCommands()
// Create BotAdvertisement
c := BotAdvertisement{
Type: "public",
BotCommands: []BotCommand{
NewBotCommand("help", "Get help using this bot"),
NewBotCommand("hello", "Say hello"),
},
}
// Send advertisement
k.AdvertiseCommand(c)
}
Loading…
Cancel
Save