teleproto - v1.230.0
    Preparing search index...

    Interface WatchOptions

    Options of ClientUpdates.watch.

    interface WatchOptions {
        events?: EventBuilder | UpdateName | UpdateName[];
        func?: (update: WithUpdateContext<AnyUpdate>) => unknown;
        independent?: boolean;
    }
    Index
    events?: EventBuilder | UpdateName | UpdateName[]

    Which updates to hand the handler - raw names or an event builder. Defaults to new messages, i.e. ["newMessage", "newChannelMessage"].

    func?: (update: WithUpdateContext<AnyUpdate>) => unknown

    Extra predicate; the handler runs only when it returns a truthy value.

    independent?: boolean

    Receives matching updates independently of the middleware chain. Defaults to false.