Documentation
¶
Overview ¶
Package discordtext bridges Discord guild text messages into rocketclaw.
Index ¶
- type Connector
- func (c *Connector) SendCronjobChannelThread(_ context.Context, channelID, relativePath, agent, ranAt, text string, ...) error
- func (c *Connector) SendRelay(_ context.Context, text string, attachments []events.OutboundAttachment) (*events.DiscordReplyTarget, error)
- func (c *Connector) SendResponse(ctx context.Context, msg *events.OutboundMessage) error
- func (c *Connector) Start(ctx context.Context) error
- func (c *Connector) Stop(context.Context) error
- type ThreadRouter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector bridges Discord text events into the shared rocketclaw bus.
func New ¶
func New(cfg config.DiscordTextConfig, bus *events.Bus, threadAgents config.ThreadAgents, threadRouter ThreadRouter, oneOffCronjobs oneOffCronjobRunner, logger *slog.Logger) *Connector
New constructs a Discord text connector.
func (*Connector) SendCronjobChannelThread ¶
func (c *Connector) SendCronjobChannelThread(_ context.Context, channelID, relativePath, agent, ranAt, text string, attachments []events.OutboundAttachment) error
SendCronjobChannelThread posts one scheduled cronjob result in a new Discord thread.
func (*Connector) SendRelay ¶
func (c *Connector) SendRelay(_ context.Context, text string, attachments []events.OutboundAttachment) (*events.DiscordReplyTarget, error)
SendRelay mirrors a non-Discord input into the configured Discord text channel.
func (*Connector) SendResponse ¶
SendResponse posts a streamed response message in Discord.
type ThreadRouter ¶
type ThreadRouter interface {
StartDiscordThread(context.Context, string, bool, *events.InboundMessage) error
PrepareDiscordThreadReply(context.Context, string) (bool, error)
PrepareDiscordResponseThreadReply(context.Context, string, string) (bool, error)
SubmitDiscordThreadReply(context.Context, string, *events.InboundMessage) (bool, error)
SubmitDiscordResponseThreadReply(context.Context, string, string, string, *events.InboundMessage) (bool, error)
SummarizeDiscordThread(context.Context, string) (bool, error)
RecordDiscordResponseCheckpoint(context.Context, string, string, events.ResponseCheckpoint) error
}
ThreadRouter routes Discord thread messages directly to app-owned thread bridges.
Click to show internal directories.
Click to hide internal directories.