detect_digit
detect_digit
Detect DTMF digits. A typed convenience over detect() that builds the
{"type": "digit", "params": {...}} configuration for you. All parameters are
keyword-only.
Parameters
digits
The digits to listen for, such as "1234567890*#". Omit to detect any digit.
Keyword-only.
timeout
Maximum seconds to run the detector before stopping. Keyword-only.
on_completed
Callback invoked when the operation reaches a terminal state. Can be a regular function or async coroutine. Keyword-only.
Returns
DetectAction — An action handle with stop() and wait() methods. It resolves on the first detection result.