telegram

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package telegram implements the Telegram channel plugin for the forge channel system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin implements channels.ChannelPlugin for Telegram.

func New

func New() *Plugin

New creates an uninitialised Telegram plugin.

func (*Plugin) Init

func (p *Plugin) Init(cfg channels.ChannelConfig) error

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) NormalizeEvent

func (p *Plugin) NormalizeEvent(raw []byte) (*channels.ChannelEvent, error)

NormalizeEvent parses a Telegram Update JSON into a ChannelEvent.

func (*Plugin) SendResponse

func (p *Plugin) SendResponse(event *channels.ChannelEvent, response *a2a.Message) error

SendResponse sends a text message back to the Telegram chat. If the runtime attached file parts (large tool outputs), those are used for the document upload since the LLM text may be truncated. For large responses (>4096 chars), sends a summary message and uploads the full report as a document.

func (*Plugin) Start

func (p *Plugin) Start(ctx context.Context, handler channels.EventHandler) error

func (*Plugin) Stop

func (p *Plugin) Stop() error

Jump to

Keyboard shortcuts

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