Documentation
¶
Overview ¶
Package filter provides built-in filter implementations for TGBox.
Index ¶
- func All(_ *tgbox.Context, _ *tgbox.Update) bool
- func And(filters ...tgbox.Filter) tgbox.Filter
- func Command(cmds ...string) tgbox.Filter
- func Group(_ *tgbox.Context, update *tgbox.Update) bool
- func Incoming(_ *tgbox.Context, update *tgbox.Update) bool
- func Not(f tgbox.Filter) tgbox.Filter
- func Or(filters ...tgbox.Filter) tgbox.Filter
- func Private(_ *tgbox.Context, update *tgbox.Update) bool
- func State(sm tgbox.StateManager, expected string) tgbox.Filter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Command ¶
Command passes if the message starts with one of the given commands, optionally suffixed with a bot mention ("/start@my_bot").
func Incoming ¶
Incoming passes for updates that were not produced by this client's own outgoing RPC calls.
func State ¶
func State(sm tgbox.StateManager, expected string) tgbox.Filter
State passes if the current user's conversational state in the provided StateManager matches expected. It is 100% non-blocking, safe against nil contexts, and relies strictly on the underlying storage driver. Retrieval errors or expired states are safely treated as no match.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.