forked from f0ck/f0ckv2
blah
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import cfg from "../../../config.json";
|
||||
import sql from "../sql.mjs";
|
||||
import lib from "../lib.mjs";
|
||||
import { getLevel } from "../admin.mjs";
|
||||
|
||||
import fs from "fs";
|
||||
import { exec as _exec } from "child_process";
|
||||
@@ -50,7 +51,8 @@ export default async bot => {
|
||||
|
||||
// download data
|
||||
const start = new Date();
|
||||
const source = (await exec(`youtube-dl "${link}" --max-filesize 10000m -o ./tmp/${filename}`)).stdout.trim();
|
||||
const maxfilesize = getLevel(e.user).level > 50 ? cfg.main.maxfilesize * 2.5 : cfg.main.maxfilesize;
|
||||
const source = (await exec(`youtube-dl "${link}" --max-filesize ${maxfilesize} -o ./tmp/${filename}`)).stdout.trim();
|
||||
if(source.match(/larger than/))
|
||||
return e.reply("too large lol");
|
||||
const end = ~~((new Date() - start) / 1e3);
|
||||
|
Reference in New Issue
Block a user