This is a refactor of samhofi.us/x/keybase/v2 that takes advantage of the libkeybase performance improvements.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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", "!help <command>"),
|
|
|
|
NewBotCommand("hello", "Say hello", "!hello"),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
// Send advertisement
|
|
|
|
k.AdvertiseCommand(c)
|
|
|
|
}
|