blah
This commit is contained in:
@ -21,6 +21,13 @@ export default async bot => {
|
||||
const user = e.message.trim().substring(7);
|
||||
e.reply( JSON.stringify( getLevel( e.self.user.get(user) || {} ) ) );
|
||||
}
|
||||
}, {
|
||||
name: "self",
|
||||
call: /^!self$/i,
|
||||
active: true,
|
||||
f: e => {
|
||||
e.reply( JSON.stringify( e.user ) );
|
||||
}
|
||||
}, {
|
||||
name: "sandbox_debug",
|
||||
call: /^\!debug (.*)/i,
|
||||
|
@ -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