import { EventBuilder , EventCommon } from "./common" ; import type { TelegramClient } from ".." ; import { Api } from "../tl" ; export interface RawInterface { /**
     * The types that the  Api . TypeUpdate instance must be.
     * Equivalent to ``if (update instanceof type) return update``.
      types ? : Function [ ] ; func ? : CallableFunction ; } /**
 * The RAW updates that telegram sends. these are  Api . TypeUpdate objects.
 * The are useful to handle custom events that you need like user typing or games.
 *  example export class Raw extends EventBuilder { private readonly types ? : Function [ ] ; constructor ( params ) { super ( { func : params . func } ) ; this . types = params . types ; } async resolve ( client ) { this . resolved = true ; } build ( update ) { return update ; } filter ( event ) { if ( this . types ) { let correct = false ; for ( const type of this . types ) { if ( event instanceof type ) { correct = true ; break ; } } if ( ! correct ) { return ; } } return super . filter ( event ) ; } }