bots

package
v5.4.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2020 License: BSD-3-Clause, BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyTeamBotSettings

func ApplyTeamBotSettings(ctx context.Context, g *globals.Context, botUID gregor1.UID,
	botSettings keybase1.TeamBotSettings,
	msg chat1.MessagePlaintext, convID *chat1.ConversationID,
	mentionMap map[string]struct{}, debug utils.DebugLabeler) (bool, error)

func SortCommandsForMatching

func SortCommandsForMatching(cmds []chat1.UserBotCommandOutput)

Types

type CachingBotCommandManager

type CachingBotCommandManager struct {
	globals.Contextified
	utils.DebugLabeler
	sync.Mutex
	// contains filtered or unexported fields
}

func NewCachingBotCommandManager

func NewCachingBotCommandManager(g *globals.Context, ri func() chat1.RemoteInterface,
	nameInfoSource nameInfoSourceFn) *CachingBotCommandManager

func (*CachingBotCommandManager) Advertise

func (b *CachingBotCommandManager) Advertise(ctx context.Context, alias *string,
	ads []chat1.AdvertiseCommandsParam) (err error)

func (*CachingBotCommandManager) Clear

func (b *CachingBotCommandManager) Clear(ctx context.Context) (err error)

func (*CachingBotCommandManager) ListCommands

func (b *CachingBotCommandManager) ListCommands(ctx context.Context, convID chat1.ConversationID) (res []chat1.UserBotCommandOutput, alias map[string]string, err error)

func (*CachingBotCommandManager) PublicCommandsConv

func (b *CachingBotCommandManager) PublicCommandsConv(ctx context.Context, username string) (*chat1.ConversationID, error)

func (*CachingBotCommandManager) Start

func (b *CachingBotCommandManager) Start(ctx context.Context, uid gregor1.UID)

func (*CachingBotCommandManager) Stop

func (b *CachingBotCommandManager) Stop(ctx context.Context) chan struct{}

func (*CachingBotCommandManager) UpdateCommands

func (b *CachingBotCommandManager) UpdateCommands(ctx context.Context, convID chat1.ConversationID,
	info *chat1.BotInfo) (completeCh chan error, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL