Class TdApi.InputMessageVoiceNote

Enclosing class:
TdApi

public static class TdApi.InputMessageVoiceNote extends TdApi.InputMessageContent
A voice note message.
  • Field Details

    • voiceNote

      public TdApi.InputFile voiceNote
      Voice note to be sent. The voice note must be encoded with the Opus codec and stored inside an OGG container with a single audio channel, or be in MP3 or M4A format as regular audio.
    • duration

      public int duration
      Duration of the voice note, in seconds.
    • waveform

      public byte[] waveform
      Waveform representation of the voice note in 5-bit format.
    • caption

      public TdApi.FormattedText caption
      Voice note caption; may be null if empty; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters.
    • selfDestructType

      public TdApi.MessageSelfDestructType selfDestructType
      Voice note self-destruct type; may be null if none; pass null if none; private chats only.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • InputMessageVoiceNote

      public InputMessageVoiceNote()
      A voice note message.
    • InputMessageVoiceNote

      public InputMessageVoiceNote(TdApi.InputFile voiceNote, int duration, byte[] waveform, TdApi.FormattedText caption, TdApi.MessageSelfDestructType selfDestructType)
      A voice note message.
      Parameters:
      voiceNote - Voice note to be sent. The voice note must be encoded with the Opus codec and stored inside an OGG container with a single audio channel, or be in MP3 or M4A format as regular audio.
      duration - Duration of the voice note, in seconds.
      waveform - Waveform representation of the voice note in 5-bit format.
      caption - Voice note caption; may be null if empty; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters.
      selfDestructType - Voice note self-destruct type; may be null if none; pass null if none; private chats only.
  • Method Details

    • getConstructor

      public int getConstructor()
      Description copied from class: TdApi.Object
      Returns an identifier uniquely determining type of the object.
      Specified by:
      getConstructor in class TdApi.Object
      Returns:
      this.CONSTRUCTOR