discordtext

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package discordtext bridges Discord guild text messages into rocketclaw.

Index

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 harnessbridge.PrimaryTextRouter, oneOffCronjobs primarytext.OneOffCronjobRunner, interruptMainTurn func() *events.InboundMessage, answerQuestion func(context.Context, string, events.AskUserQuestionAnswer) bool, answerQuestionText func(context.Context, events.Source, events.TextConversationTarget, string) bool, logger *slog.Logger) *Connector

New constructs a Discord text connector.

func (*Connector) AskUserQuestion added in v0.0.12

AskUserQuestion posts one in-message Discord Text question.

func (*Connector) DeleteUserQuestion added in v0.0.12

func (c *Connector) DeleteUserQuestion(_ context.Context, target events.TextConversationTarget) error

DeleteUserQuestion deletes one Discord Text question message.

func (*Connector) SendCronjobChannelThread

func (c *Connector) SendCronjobChannelThread(ctx 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) SendExternalMCPRelay added in v0.0.7

func (c *Connector) SendExternalMCPRelay(_ context.Context, channelID, text string, attachments []events.OutboundAttachment) (*events.DiscordReplyTarget, error)

SendExternalMCPRelay mirrors an external MCP prompt into Discord before the session handles it.

func (*Connector) SendExternalMCPThreadRelay added in v0.0.7

func (c *Connector) SendExternalMCPThreadRelay(_ context.Context, threadID, text string, attachments []events.OutboundAttachment) (*events.DiscordReplyTarget, error)

SendExternalMCPThreadRelay mirrors an external MCP follow-up into an existing Discord thread.

func (*Connector) SendResponse

func (c *Connector) SendResponse(_ context.Context, msg *events.OutboundMessage) error

SendResponse posts a streamed response message in Discord.

func (*Connector) SendVoiceRelay added in v0.0.7

func (c *Connector) SendVoiceRelay(_ context.Context, text string) (*events.DiscordReplyTarget, error)

SendVoiceRelay mirrors a voice utterance into Discord text before the main session handles it.

func (*Connector) Start

func (c *Connector) Start(ctx context.Context) error

Start connects to Discord and begins consuming text events.

func (*Connector) Stop

func (c *Connector) Stop(context.Context) error

Stop disconnects the connector from Discord.

Jump to

Keyboard shortcuts

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