kekse
This commit is contained in:
parent
b9a42f9e8b
commit
294c59d30b
@ -55,7 +55,7 @@ export default async bot => {
|
||||
// return await e.reply(`fuck imgur... seriously`);
|
||||
|
||||
if(regex.instagram.test(link))
|
||||
await e.reply(`insta schminsta`);
|
||||
await e.reply(`instagay`);
|
||||
|
||||
// check repost (link)
|
||||
repost = await queue.checkrepostlink(link);
|
||||
@ -131,6 +131,16 @@ export default async bot => {
|
||||
return await e.reply('something went wrong lol');
|
||||
}
|
||||
}
|
||||
else if(link.match(regex.yt)) {
|
||||
try {
|
||||
// add --cookies <path-to-cookies-file> on local instance if you want to avoid getting rate limited
|
||||
source = (await queue.exec(`yt-dlp --cookies /tmp/cookies.txt -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim();
|
||||
} catch(err) {
|
||||
if(e.type == 'tg')
|
||||
return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "yt dl error");
|
||||
return await e.reply("yt dl error", err);
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim();
|
||||
|
Loading…
x
Reference in New Issue
Block a user