API Reference
This reference lists the package entry points. All SDK calls take context.Context where a network operation is involved.
Common lifecycle pattern
| Package | Constructor | Lifecycle | Handler |
|---|---|---|---|
telegram |
New(token, opts...) |
Start(ctx), Close(), Status() |
Reply(handler) |
discord |
New(token) |
Start(ctx), Close(), Status() |
Reply(handler) |
line |
New(secret, token, port, opts...) |
Start(ctx), Close(), Status() |
Reply(handler) |
Telegram
Send, Delete, SendFile, SendPhoto, SendVoice, SendInput, SendSelect, SendMultiSelect, SendStatus, FinishStatus, and Save are available. Options include WithHTTPClient, WithPollTimeout, WithSendType, WithStatusEmoji, and WithStatusSendType.
Discord
Send, Delete, SendFiles, SendVoice, SendInput, SendSelect, SendMultiSelect, SendStatus, FinishStatus, and Save are available. WithStatusEmoji configures a status reaction.
LINE and TTS
LINE exposes Send and Save in addition to lifecycle and Reply; WithPath sets the webhook route. TTS exposes Get(ctx, apiKey, text) ([]byte, error).