internal

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceBackfill messageSource
)

Variables

View Source
var (
	ErrMessageNotFound = errors.New("message not found")
)

Functions

This section is empty.

Types

type Bot

type Bot struct {
	DB          *pgxpool.Pool
	DocsConfig  *docs.Config
	RiverClient *river.Client[pgx.Tx]
}

func New

func New(db *pgxpool.Pool) *Bot

func (*Bot) AddMessage

func (b *Bot) AddMessage(ctx context.Context, tx pgx.Tx, params []schema.AddMessageParams, source messageSource) error

func (*Bot) AddThreadMessages

func (b *Bot) AddThreadMessages(ctx context.Context, tx pgx.Tx, params []schema.AddThreadMessageParams, source messageSource) error

func (*Bot) DisableAutoDocReply added in v0.0.19

func (b *Bot) DisableAutoDocReply(ctx context.Context, channelID string) error

func (*Bot) EnableAutoDocReply added in v0.0.19

func (b *Bot) EnableAutoDocReply(ctx context.Context, channelID string) error

func (*Bot) GetMessage

func (b *Bot) GetMessage(
	ctx context.Context,
	channelID string,
	slackTs string,
) (schema.GetMessageRow, error)

func (*Bot) Init

func (b *Bot) Init(riverClient *river.Client[pgx.Tx], docsConfig *docs.Config) error

func (*Bot) NotifyMessage added in v0.0.6

func (b *Bot) NotifyMessage(ctx context.Context, ev *slackevents.MessageEvent) error

func (*Bot) NotifyReactionAdded added in v0.0.6

func (b *Bot) NotifyReactionAdded(ctx context.Context, ev *slackevents.ReactionAddedEvent) error

func (*Bot) NotifyReactionRemoved added in v0.0.6

func (b *Bot) NotifyReactionRemoved(ctx context.Context, ev *slackevents.ReactionRemovedEvent) error

func (*Bot) UpdateChannel

func (b *Bot) UpdateChannel(ctx context.Context, tx pgx.Tx, params schema.UpdateChannelAttrsParams) error

Jump to

Keyboard shortcuts

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