How can i send a audio file as voice message? #675
-
Is it possible to send a audio file as a voice message? |
Beta Was this translation helpful? Give feedback.
Answered by
aiko-chan-ai
May 26, 2023
Replies: 1 comment 3 replies
-
const channel = client.channels.cache.get('cid');
const attachment = new Discord.MessageAttachment(
'./test.mp3', // path file
'test.ogg', // must be .ogg
{
waveform: '=',
duration_secs: 1, // any number you want
},
);
channel.send({
files: [attachment],
flags: 'IS_VOICE_MESSAGE',
}); you can use it in the next updated version |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
lonelil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can use it in the next updated version