Looking for help on a small discord bot project

Hello I am trying to make a small discord bot that will download videos from YouTube upon a user doing /reqest (url) and then it has a cooldown is this something someone can help me with thanks
11 Replies
d.js toolkit
d.js toolkit12mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
𝙎𝙠𝙞𝙥𝙥𝙮
const Discord = require('discord.js'); const ytdl = require('ytdl-core'); const fs = require('fs'); const { Client, GatewayIntentBits } = require('discord.js'); const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers, ], }); client.on('messageCreate', async message => { if (message.content.startsWith('/request')) { const url = message.content.split(' ')[1]; const stream = ytdl(url, { filter: 'audioonly' }); stream.pipe(fs.createWriteStream('output.mp3')); } }); client.login('token');
treble/luna
treble/luna12mo ago
we do not support tos violations
𝙎𝙠𝙞𝙥𝙥𝙮
how is this in violation tos its not for a music bot
treble/luna
treble/luna12mo ago
downloading videos is agains youtube's tos
𝙎𝙠𝙞𝙥𝙥𝙮
no its not if you have premium I have premium
treble/luna
treble/luna12mo ago
It still is Now kindly stop
𝙎𝙠𝙞𝙥𝙥𝙮
its not but ok
Syjalo
Syjalo12mo ago
About YouTube Premium. You're allowed to download from the YouTube app only. https://www.youtube.com/t/terms_paidservice
No description
treble/luna
treble/luna12mo ago
(they left lmao)
Want results from more Discord servers?
Add your server