Skip to content

Commit

Permalink
audio/x-wav
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-moomoo committed Sep 1, 2024
1 parent b74998d commit 5836376
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions discord.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ client.on("messageCreate", async (message) => {
"audio/ogg",
"audio/flac",
"audio/mpeg",
"audio/x-wav",
].indexOf(attachment.contentType) != -1
) {
if (attachment.contentType == "audio/mpeg")
attachment.contentType = "audio/mp3";
if (attachment.contentType == "audio/x-wav")
attachment.contentType = "audio/wav";
const response = await fetch(attachment.proxyURL);
const arrayBuffer = await response.arrayBuffer();
const data = Buffer.from(arrayBuffer).toString("base64");
Expand Down

0 comments on commit 5836376

Please sign in to comment.