Prefix for the data. Use something unique across your bot.
Rest
...fields: T[]Field names in the order they will be serialized.
Prefix for the data. Use something unique across your bot.
Build a callback data string
Object containing the data
Create a filter for this callback data.
You can either pass an object with field names as keys and values as strings or regexes,
which will be compiled to a RegExp, or a function that will be called with the parsed data.
Note that the strings will be passed to RegExp
directly, so you may want to escape them.
When using a function, you can either return a boolean, or an object with field names as keys and values as strings or regexes. In the latter case, the resulting object will be matched against the parsed data the same way as if you passed it directly.
Parse callback data to object
Callback data as string
Optional
safe: falseIf true
, will return null
instead of throwing on invalid data
Callback data builder, inspired by aiogram.
This can be used to simplify management of different callbacks.
Learn more in the docs