Documentation
¶
Overview ¶
Package telegram provides a Telegram provider for omnichat.
Index ¶
- type Config
- type Provider
- func (p *Provider) Connect(ctx context.Context) error
- func (p *Provider) Disconnect(ctx context.Context) error
- func (p *Provider) Name() string
- func (p *Provider) OnEvent(handler provider.EventHandler)
- func (p *Provider) OnMessage(handler provider.MessageHandler)
- func (p *Provider) Send(ctx context.Context, chatID string, msg provider.OutgoingMessage) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the Provider interface for Telegram.
func (*Provider) Disconnect ¶
Disconnect closes the Telegram connection.
func (*Provider) OnEvent ¶
func (p *Provider) OnEvent(handler provider.EventHandler)
OnEvent registers an event handler.
func (*Provider) OnMessage ¶
func (p *Provider) OnMessage(handler provider.MessageHandler)
OnMessage registers a message handler.
Click to show internal directories.
Click to hide internal directories.