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.
35 lines
695 B
35 lines
695 B
package keybase |
|
|
|
import "samhofi.us/x/keybase/types/chat1" |
|
|
|
func ExampleKeybase_AdvertiseCommands() { |
|
var k = NewKeybase() |
|
|
|
// Clear out any previously advertised commands |
|
k.ClearCommands() |
|
|
|
// Create BotAdvertisement |
|
ads := AdvertiseCommandsOptions{ |
|
Alias: "RSS Bot", |
|
Advertisements: []chat1.AdvertiseCommandAPIParam{ |
|
{ |
|
Typ: "public", |
|
Commands: []chat1.UserBotCommandInput{ |
|
{ |
|
Name: "rss addfeed", |
|
Description: "Add RSS feed", |
|
Usage: "<url>", |
|
}, |
|
{ |
|
Name: "rss delfeed", |
|
Description: "Remove RSS feed", |
|
Usage: "<url>", |
|
}, |
|
}, |
|
}, |
|
}, |
|
} |
|
|
|
// Send advertisement |
|
k.AdvertiseCommands(ads) |
|
}
|
|
|