@ -67,7 +67,7 @@ class audio2imageCommand extends Command {
.output(`${os.tmpdir()}/a2i${message.id}.png`)
.output(`${os.tmpdir()}/a2i${message.id}.png`)
.on('error',(err,stdout,stderr)=>{
.on('error',(err,stdout,stderr)=>{
console.error(`${err}\n${stdout}\n${stderr}`);
console.error(`${err}\n${stdout}\n${stderr}`);
returnmessage.channel.send('Uh oh, an error has occured! The image size is most likely bigger than the content!');
returnmessage.channel.send('Uh oh, an error has occured! The image size is most likely bigger than the content! Try again!');
})
})
.on('end',()=>{
.on('end',()=>{
console.log('finished');
console.log('finished');
@ -76,7 +76,7 @@ class audio2imageCommand extends Command {
letfileSize=(file.size/1000000.0).toFixed(2);
letfileSize=(file.size/1000000.0).toFixed(2);
returnmessage.channel.send(`Image is ${fileSize} MB for ${args.video_size} resolution`,{files:[`${os.tmpdir()}/a2i${message.id}.png`]})
returnmessage.channel.send(`Image is ${fileSize} MB for ${args.video_size} resolution`,{files:[`${os.tmpdir()}/a2i${message.id}.png`]})
.catch(()=>{
.catch(()=>{
returnmessage.channel.send(`End result is too big to fit on discord! File is ${fileSize} MB`);});
returnmessage.channel.send(`End result is too big to fit on discord! File is ${fileSize} MB! Unless it's GB or even TB, in which case that is a huge image!`);});
@ -21,7 +21,7 @@ class vidshittifierCommand extends Command {
}
}
],
],
description:{
description:{
content:'Make your vid shit quality.',
content:'Compress your videos and lower their quality!',
usage:'[link to video] [compression ( 1, 2 or 3)]',
usage:'[link to video] [compression ( 1, 2 or 3)]',
examples:['']
examples:['']
}
}
@ -60,13 +60,13 @@ class vidshittifierCommand extends Command {
if(err){
if(err){
console.error(err);
console.error(err);
loadingmsg.delete();
loadingmsg.delete();
returnmessage.channel.send('An error has occured, I can\'t download from the link you provided.');
returnmessage.channel.send('An error has occured, I can\'t download from the link you provided. Try again!');
}else{
}else{
shittifie();
shittifie();
}
}
});
});
}else{
}else{
returnmessage.channel.send('You need a valid video link!');
returnmessage.channel.send('You need a valid video link! Try again!');
}
}
functionshittifie(){
functionshittifie(){
@ -82,13 +82,13 @@ class vidshittifierCommand extends Command {
.catch(err=>{
.catch(err=>{
console.error(err);
console.error(err);
loadingmsg.delete();
loadingmsg.delete();
returnmessage.channel.send('On no! an error just occured! perhaps the file is too big?');
returnmessage.channel.send('On no! an error just occured! Maybe the file is too big?');
});
});
})
})
.catch(err=>{
.catch(err=>{
console.error(err);
console.error(err);
loadingmsg.delete();
loadingmsg.delete();
returnmessage.channel.send('On no! an error just occured! Im gonna be honest with you, i don\'t know what caused it yet! but worry not! my owner will look into it soon!');
returnmessage.channel.send('Oh no! an error just occured! We don'tknowwhatcausesthiserroryet,soletusknow!);
@ -208,7 +208,7 @@ class ytpCommand extends Command {
}
}
}
}
letloadingmsg=awaitmessage.channel.send(`Processing, this can take a **long** time, i'll ping you when i finished <a:loadingmin:527579785212329984>\nSome info: There is currently ${mp4.length} videos, you can add yours by doing \`\`${this.client.commandHandler.prefix[0]}ytp --add (link or attachment)\`\``);
letloadingmsg=awaitmessage.channel.send(`Processing, this can take a ***long*** time, i'll ping you when i finished <a:loadingmin:527579785212329984>\nSome info: There are currently ${mp4.length} videos, you can add yours by doing \`\`${this.client.commandHandler.prefix[0]}ytp --add (link or attachment). Thanks for contributing!\`\``);
letoptions={
letoptions={
@ -250,7 +250,7 @@ class ytpCommand extends Command {
awaitytpHash.create(body);
awaitytpHash.create(body);
});
});
loadingmsg.delete();
loadingmsg.delete();
returnmessage.reply('Here is your YTP! Remember, it might contain nsfw!',{files:[`${os.tmpdir()}/${message.id}_YTP.mp4`]})
returnmessage.reply('Here is your YTP! Remember, it might contain nsfw, so be careful!',{files:[`${os.tmpdir()}/${message.id}_YTP.mp4`]})
.catch(err=>{
.catch(err=>{
console.error(err);
console.error(err);
returnmessage.channel.send('Whoops, look like the vid might be too big for discord, my bad, please try again');
returnmessage.channel.send('Whoops, look like the vid might be too big for discord, my bad, please try again');
@ -260,9 +260,9 @@ class ytpCommand extends Command {