From 6277ea41bfb9635047040a3e97d593e65f77b048 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 27 Oct 2019 23:03:54 +0100 Subject: [PATCH] add various info --- commands/fun/ytp.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/fun/ytp.js b/commands/fun/ytp.js index a6863929..6808f936 100644 --- a/commands/fun/ytp.js +++ b/commands/fun/ytp.js @@ -3,6 +3,7 @@ const YTPGenerator = require('ytpplus-node'); const os = require('os'); const fs = require('fs'); const youtubedl = require('youtube-dl'); +const { prefix } = require('../../config.json'); class ytpCommand extends Command { constructor() { @@ -45,8 +46,9 @@ class ytpCommand extends Command { loadingmsg.delete(); return message.channel.send('An error has occured, I can\'t download from the link you provided.'); } else { + let length = fs.readdirSync('./asset/ytp/userVid/').length; loadingmsg.delete(); - return message.reply('Video sucessfully added to the pool!'); + return message.reply(`Video sucessfully added to the pool! There is now ${length} videos`); } }); } else { @@ -56,7 +58,7 @@ class ytpCommand extends Command { } if (!message.channel.nsfw) return message.channel.send('Please execute this command in an NSFW channel ( Content might not be NSFW but since the video are user submitted better safe than sorry )'); - let loadingmsg = await message.channel.send('Processing, this can take a **long** time, i\'ll ping you when i finished '); + let loadingmsg = await message.channel.send(`Processing, this can take a **long** time, i'll ping you when i finished \nSome info: There is currently ${fs.readdirSync('./asset/ytp/userVid/').length} videos, you can add yours by doing \`\`${prefix[0]} ytp --add (link or attachment)\`\``); // Read userVid folder and only take .mp4 let asset = [];