telebot-ts API Documentation - v1.0.0
    Preparing search index...

    Function isInputFile

    • Type guard to check if an arbitrary object conforms to the InputFile interface.

      Parameters

      • obj: unknown

        Object or value to check.

      Returns obj is InputFile

      true if obj is an InputFile, false otherwise.

      if (isInputFile(payload.photo)) {
      console.log("Found file upload:", payload.photo.filename);
      }