Documentation

Core Concepts

go-bot uses synchronous reply handlers and platform-native interaction primitives.

Lifecycle

Call New, register Reply, then call Start(ctx). New creates a client without opening a transport. Start validates credentials; Close is idempotent.

Platform Transport Validation
Telegram long-polling goroutine GetMe
Discord REST then gateway User("@me")
LINE HTTP server GetBotInfo and net.Listen

Reply and interaction flow

A non-empty handler return sends an automatic text reply. Return an empty string when application code sends media or controls the response. Telegram delivers single picks through CallbackData and multi picks through CallbackPicks; Discord maps modal input to Text and multi-select values to CallbackPicks. LINE deliberately has no select/input/status components.

Media and status

Telegram, Discord, and LINE save media through UUID-named temporary files with caps of 20 MiB, 25 MiB, and 50 MiB. Telegram and Discord status entries are debounced per chat/channel and FinishStatus clears the reaction and removes the status message.

中文