Download Music or Tutorial format in audio or video format into your pc or format, just by clicking the button, you can use link or just typing the name of the video, after you click download it will redirect you to the browser and automactically download, if your using link it would just redirect to the decide and you will have to click on the download button. dont forget to put your own prefix instead of ~, happy hacking!!
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const axios = require('axios');
const content = context.params.event.content.split(' ')?.slice(1)?.join(' ');
const {data} = await axios(
`https://apiv2.spapi.ga/fun/ytvinfo?search=${content}`
);
console.log(data);
const link = `https://audible-youtube.herokuapp.com/download?query=${data.url}`;
const blink = `https://savefrom.net/${data.url}`;
if (content.startsWith(`https://`)) {
const clink = `https://audible-youtube.herokuapp.com/download?query=${content}`;
const c4link = `https://savefrom.net/${content}`;
await lib.discord.channels['@0.3.2'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `Click The Button, To Download The Mp3 or Mp4 format.\n${content}`,
components: [
{
type: 1,
components: [
{
style: 5,
label: `Download Mp3`,
url: `${clink}`,
disabled: false,
emoji: {
id: `972286122736635924`,
name: `download`,
animated: false,
},
type: 2,
},
{
style: 5,
label: `Download Mp4`,
url: `${c4link}`,
disabled: false,
emoji: {
id: `972286122736635924`,
name: `download`,
animated: false,
},
type: 2,
},
],
},
],
});
} else {
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
components: [
{
type: 1,
components: [
{
style: 5,
label: `Download Mp3`,
url: `${link}`,
disabled: false,
emoji: {
id: `972286122736635924`,
name: `download`,
animated: false,
},
type: 2,
},
{
style: 5,
label: `Download Mp4`,
url: `${blink}`,
disabled: false,
emoji: {
id: `972286122736635924`,
name: `download`,
animated: false,
},
type: 2,
},
],
},
],
embeds: [
{
type: 'rich',
title: `${data.title}`,
description: `
\`•\` Views - **${data.views.normal}/${data.views.short}**
\`•\` Published Time - **${data.publishedtime}**
\`•\` Video Duration - **${data.duration.normal}/${data.duration.long}**`,
color: 0xf59555,
image: {
url: `${data.thumbnails[0].url}`,
height: 0,
width: 0,
},
thumbnail: {
url: `${
data.thumbnails[0].url
? data.owner.thumbnails[0].url
: data.owner.thumbnails[1].url
}`,
height: 0,
width: 0,
},
footer: {
text: `Video By: ${data.owner.name}`,
icon_url: `${
data.owner.thumbnails[0].url ? data.owner.thumbnails[0].url : ''
}`,
},
url: `${data.url}`,
},
],
});
}