From d7bf82ff072c06a164f70921c33fa7cd0d83a3af Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 27 Oct 2019 23:18:09 +0100 Subject: [PATCH] Add --pool to show how many vid there is --- commands/fun/ytp.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/commands/fun/ytp.js b/commands/fun/ytp.js index 6808f936..43636f54 100644 --- a/commands/fun/ytp.js +++ b/commands/fun/ytp.js @@ -16,6 +16,11 @@ class ytpCommand extends Command { match: 'flag', flag: ['--add'] }, + { + id: 'pool', + match: 'flag', + flag: ['--pool'] + }, { id: 'link', type: 'string' @@ -30,6 +35,10 @@ class ytpCommand extends Command { } async exec(message, args) { + if (args.pool) { + return message.channel.send(`here is currently ${fs.readdirSync('./asset/ytp/userVid/').length} videos, you can add yours by doing \`\`${prefix[0]} ytp --add (link or attachment)\`\``); + } + if (args.add) { let loadingmsg = await message.channel.send('Downloading '); let Attachment = (message.attachments).array();