Documentation
¶
Overview ¶
Package telegram implements AstraEngine's Telegram Bot API adapter.
Index ¶
- type Config
- type Platform
- func (p *Platform) AnswerCallback(ctx context.Context, callbackID string, text string) error
- func (p *Platform) Capabilities() capability.Capabilities
- func (p *Platform) Edit(ctx context.Context, ev event.Event, msg platform.OutgoingMessage) error
- func (p *Platform) EditByRef(ctx context.Context, ref platform.MessageRef, msg platform.OutgoingMessage) error
- func (p *Platform) Name() string
- func (p *Platform) Raw() any
- func (p *Platform) Send(ctx context.Context, target platform.Target, msg platform.OutgoingMessage) error
- func (p *Platform) SendWithRef(ctx context.Context, target platform.Target, msg platform.OutgoingMessage) (platform.MessageRef, error)
- func (p *Platform) Start(ctx context.Context, dispatcher platform.Dispatcher) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Token string
ServerURL string
ProxyURL string
CheckInitTimeout time.Duration
PollTimeout time.Duration
RequestTimeout time.Duration
Debug bool
SkipGetMe bool
}
Config configures Telegram API access, proxying and request timeouts.
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
Platform adapts Telegram updates and messages to AstraEngine contracts.
func (*Platform) AnswerCallback ¶
func (*Platform) Capabilities ¶
func (p *Platform) Capabilities() capability.Capabilities
func (*Platform) EditByRef ¶
func (p *Platform) EditByRef(ctx context.Context, ref platform.MessageRef, msg platform.OutgoingMessage) error
func (*Platform) SendWithRef ¶
func (p *Platform) SendWithRef(ctx context.Context, target platform.Target, msg platform.OutgoingMessage) (platform.MessageRef, error)