Compare commits

..

No commits in common. "b095d5ce3a045cc22f5d7fa67f2042c1ed01a2d0" and "50e49db47c30c1476e1c99f20d2c4a6b541f5d13" have entirely different histories.

2 changed files with 4 additions and 15 deletions

View file

@ -167,7 +167,7 @@ export default {
const tweetid = tweeted.data.id;
const FunnyWords = ['oppaGangnamStyle', '69', '420', 'cum', 'funnyMan', 'GUCCISmartToilet', 'TwitterForClowns', 'fart', 'ok', 'hi', 'howAreYou', 'WhatsNinePlusTen', '21'];
const TweetLink = `https://vxtwitter.com/${FunnyWords[Math.floor((Math.random() * FunnyWords.length))]}/status/${tweetid}`;
const TweetLink = `https://twitter.com/${FunnyWords[Math.floor((Math.random() * FunnyWords.length))]}/status/${tweetid}`;
let channel = await client.channels.resolve(twiChannel);
channel.send(TweetLink);

View file

@ -15,10 +15,6 @@ export default {
option.setName('url')
.setDescription('URL of the video you want to convert')
.setRequired(true))
.addIntegerOption(option =>
option.setName('quality')
.setDescription('Quality of the gif conversion. Default 70. Number between 1 and 100')
.setRequired(false))
.addBooleanOption(option =>
option.setName('noloop')
.setDescription('Stop the gif from looping')
@ -29,13 +25,6 @@ export default {
await interaction.deferReply({ ephemeral: false });
const maxFileSize = await utils.getMaxFileSize(interaction.guild);
const url = args.url;
let quality = args.quality;
if (quality <= 0) {
quality = 1;
}
else if (quality > 100) {
quality = 100;
}
if (!await utils.stringIsAValidurl(url)) {
console.error(`Not a url!!! ${url}`);
@ -52,7 +41,7 @@ export default {
// Extract every frame for gifski
await utils.ffmpeg(`-i ${output} ${os.tmpdir()}/frame${interaction.id}%04d.png`);
// Make it look better
await gifski(gifskiOutput, `${os.tmpdir()}/frame${interaction.id}*`, quality);
await gifski(gifskiOutput, `${os.tmpdir()}/frame${interaction.id}*`);
// Optimize it
await gifsicle(gifskiOutput, gifsicleOutput, args.noloop);
@ -77,9 +66,9 @@ export default {
},
};
async function gifski(output, input, quality) {
async function gifski(output, input) {
return await new Promise((resolve, reject) => {
exec(`gifski --quality ${quality ? quality : 70} -o ${output} ${input}`, (err, stdout, stderr) => {
exec(`gifski --quality 70 -o ${output} ${input}`, (err, stdout, stderr) => {
if (err) {
reject(stderr);
}