Discord.js - TTS command

I was wondering if it would be possible to make a command (using discord.js) which takes the users input and returns it back as a mp4 file with the input.

From what I found, you could use this.

How would you send the mp4 itself instead of the url?

I think it returns a mp4 link. I never used it.

It returns a link to the mp4 file, How would you get it to send the mp4 file instead of the link?

Returns audio/mpeg.

For instance: https://translate.google.com/translate_tts?ie=UTF-8&q=Hello%20World&tl=en&total=1&idx=0&textlen=11&tk=539567.982175&client=t&prev=input&ttsspeed=1

How would you send the mp4 to the channel rather than the link to it?

I can’t spoon feed. Look on npmjs.com or look on google.

I’ve looked into it but couldn’t find it

That should help you.

Is there any other way to get the file from the link and send it?

Not that I can think of.

Discord.js’s method for playing a local file also supports a url. See https://discordjs.guide/voice/the-basics.html#playing-audio

What we’re trying to do is send the mp3 to the channel with the text the user entered, Not play it in a voice channel.