|
|
|
@ -296,6 +296,17 @@ type Channel struct {
@@ -296,6 +296,17 @@ type Channel struct {
|
|
|
|
|
TopicName string `json:"topic_name,omitempty"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type BotCommand struct { |
|
|
|
|
Name string `json:"name"` |
|
|
|
|
Description string `json:"description"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type BotAdvertisement struct { |
|
|
|
|
Type string `json:"type"` // "public", "teamconvs", "teammembers"
|
|
|
|
|
TeamName string `json:"team_name,omitempty"` // required if Type is not "public"
|
|
|
|
|
BotCommands []BotCommand `json:"commands"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type mesg struct { |
|
|
|
|
Body string `json:"body"` |
|
|
|
|
} |
|
|
|
@ -313,6 +324,8 @@ type options struct {
@@ -313,6 +324,8 @@ type options struct {
|
|
|
|
|
MsgID int `json:"msg_id,omitempty"` |
|
|
|
|
ReplyTo int `json:"reply_to,omitempty"` |
|
|
|
|
GameID string `json:"game_id,omitempty"` |
|
|
|
|
Alias string `json:"alias,omitempty"` |
|
|
|
|
BotAdvertisements []BotAdvertisement `json:"advertisements,omitempty"` |
|
|
|
|
|
|
|
|
|
Name string `json:"name,omitempty"` |
|
|
|
|
Public bool `json:"public,omitempty"` |
|
|
|
@ -641,14 +654,17 @@ type wallet interface {
@@ -641,14 +654,17 @@ type wallet interface {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type keybase interface { |
|
|
|
|
AdvertiseCommand(advertisement BotAdvertisement) (ChatAPI, error) |
|
|
|
|
AdvertiseCommands(advertisements []BotAdvertisement) (ChatAPI, error) |
|
|
|
|
ChatList() (ChatAPI, error) |
|
|
|
|
ClearCommands() (ChatAPI, error) |
|
|
|
|
CreateTeam(name string) (TeamAPI, error) |
|
|
|
|
NewChat(channel Channel) Chat |
|
|
|
|
NewTeam(name string) Team |
|
|
|
|
NewWallet() Wallet |
|
|
|
|
Run(handler func(ChatAPI), options ...RunOptions) |
|
|
|
|
version() string |
|
|
|
|
status() status |
|
|
|
|
version() string |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type status struct { |
|
|
|
|