let people add vid without being in nsfw channel
This commit is contained in:
parent
4603a07640
commit
e6112b4d34
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,6 @@ class ytpCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
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 )');
|
|
||||||
if (args.add) {
|
if (args.add) {
|
||||||
let loadingmsg = await message.channel.send('Downloading <a:loadingmin:527579785212329984>');
|
let loadingmsg = await message.channel.send('Downloading <a:loadingmin:527579785212329984>');
|
||||||
let Attachment = (message.attachments).array();
|
let Attachment = (message.attachments).array();
|
||||||
|
@ -38,7 +37,8 @@ class ytpCommand extends Command {
|
||||||
if (Attachment[0] && !args.link) {
|
if (Attachment[0] && !args.link) {
|
||||||
url = Attachment[0].url;
|
url = Attachment[0].url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 )');
|
||||||
if (url) {
|
if (url) {
|
||||||
return youtubedl.exec(url, ['-o', `./asset/ytp/userVid/${message.id}.mp4`], {}, function(err) {
|
return youtubedl.exec(url, ['-o', `./asset/ytp/userVid/${message.id}.mp4`], {}, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
Loading…
Reference in a new issue