Documentation
¶
Index ¶
- type Adapter
- func (a *Adapter) EditText(_ context.Context, externalID, messageID, text, parseMode string) error
- func (a *Adapter) IsAllowed(userID int64) bool
- func (a *Adapter) IsDebug(chatID int64) bool
- func (a *Adapter) IsDebugByExternalID(externalID string) bool
- func (a *Adapter) Name() string
- func (a *Adapter) Send(ctx context.Context, msg adapter.OutgoingMessage) error
- func (a *Adapter) SendAndGetID(ctx context.Context, msg adapter.OutgoingMessage) (string, error)
- func (a *Adapter) SendTyping(_ context.Context, externalID string) error
- func (a *Adapter) SetCallbackResolver(r adapter.CallbackResolver)
- func (a *Adapter) Start(ctx context.Context, incoming chan<- adapter.IncomingMessage) error
- func (a *Adapter) Stop() error
- type VoiceOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func (*Adapter) EditText ¶ added in v0.16.10
EditText edits an existing Telegram message. Implements adapter.MessageEditor.
func (*Adapter) IsDebug ¶ added in v0.16.10
IsDebug reports whether the given chat has debug mode enabled.
func (*Adapter) IsDebugByExternalID ¶ added in v0.16.10
IsDebugByExternalID is a convenience wrapper that parses an ExternalID string.
func (*Adapter) SendAndGetID ¶ added in v0.16.10
SendAndGetID sends a message and returns the Telegram message ID as a string. Implements adapter.MessageEditor.
func (*Adapter) SendTyping ¶ added in v0.15.0
func (*Adapter) SetCallbackResolver ¶
func (a *Adapter) SetCallbackResolver(r adapter.CallbackResolver)
SetCallbackResolver sets the resolver used to handle inline keyboard button clicks (callback queries). Call this after adapter construction, before Start.
type VoiceOpts ¶
type VoiceOpts struct {
STT voice.STTProvider
TTS voice.TTSProvider
TTSVoice string
AutoVoiceReply bool
}
VoiceOpts configures optional voice (STT/TTS) support for the adapter.
Click to show internal directories.
Click to hide internal directories.