Class InputMedia

    • Constructor Detail

      • InputMedia

        public InputMedia()
    • Method Detail

      • isNewMedia

        public boolean isNewMedia()
      • setMedia

        public void setMedia​(String media)
        Use this setter to send an existing file (using file_id) or an url.
        Parameters:
        media - File_id or URL of the file to send
      • setMedia

        public void setMedia​(File mediaFile,
                             String fileName)
        Use this setter to send new file.
        Parameters:
        mediaFile - File to send
      • setMedia

        public void setMedia​(InputStream mediaStream,
                             String fileName)
        Use this setter to send new file as stream.
        Parameters:
        mediaStream - File to send
      • getType

        public abstract String getType()