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.
21 lines
428 B
21 lines
428 B
5 years ago
|
package keybase
|
||
|
|
||
|
func ExampleKeybase_AdvertiseCommand() {
|
||
|
var k = NewKeybase()
|
||
|
|
||
|
// Clear out any previously advertised commands
|
||
|
k.ClearCommands()
|
||
|
|
||
|
// Create BotAdvertisement
|
||
|
c := BotAdvertisement{
|
||
|
Type: "public",
|
||
|
BotCommands: []BotCommand{
|
||
5 years ago
|
NewBotCommand("help", "Get help using this bot", "!help <command>"),
|
||
|
NewBotCommand("hello", "Say hello", "!hello"),
|
||
5 years ago
|
},
|
||
|
}
|
||
|
|
||
|
// Send advertisement
|
||
|
k.AdvertiseCommand(c)
|
||
|
}
|