Skip to content

Commit

Permalink
Expand check for isVoiceMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
MinnDevelopment committed Sep 22, 2024
1 parent 8c3ad3e commit 00487d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/net/dv8tion/jda/api/utils/FileUpload.java
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,10 @@ public FileUpload asVoiceMessage(@Nonnull MediaType mediaType, @Nonnull byte[] w
*/
public boolean isVoiceMessage()
{
return this.mediaType.type().equals("audio");
return this.mediaType.type().equals("audio")
&& this.durationSeconds > 0.0
&& this.waveform != null
&& this.waveform.length > 0;
}

/**
Expand Down

0 comments on commit 00487d7

Please sign in to comment.