diff --git a/docs_test.go b/docs_test.go new file mode 100644 index 0000000..77808ec --- /dev/null +++ b/docs_test.go @@ -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) +}