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 toolkitā€¢6mo 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/lunaā€¢6mo ago
we do not support tos violations
š™Žš™ š™žš™„š™„š™®
how is this in violation tos its not for a music bot
treble/luna
treble/lunaā€¢6mo ago
downloading videos is agains youtube's tos
š™Žš™ š™žš™„š™„š™®
no its not if you have premium I have premium
treble/luna
treble/lunaā€¢6mo ago
It still is Now kindly stop
Syjalo
Syjaloā€¢6mo 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/lunaā€¢6mo ago
(they left lmao)