Sam
5 years ago
1 changed files with 20 additions and 0 deletions
@ -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…
Reference in new issue