autotagger
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import fetch from "flumm-fetch-cookies";
|
||||
import { promises as fs } from "fs";
|
||||
import { exec } from "child_process";
|
||||
import cfg from "../config.mjs";
|
||||
@ -92,6 +93,16 @@ export default async bot => {
|
||||
const tmpc = await countf0cks();
|
||||
e.reply(`tagged: ${tmpc.tagged}; untagged: ${tmpc.untagged}; sfw: ${tmpc.sfw}; nsfw: ${tmpc.nsfw}; total: ${tmpc.total}`);
|
||||
break;
|
||||
case "autotagger":
|
||||
const body = { headers: { Authorization: `Basic ${cfg.tagger.btoa}` } };
|
||||
const res = await (await fetch(`${cfg.tagger.endpoint}/usage`, body)).json();
|
||||
if(res) {
|
||||
const processed = res.result.monthly_processed;
|
||||
const limit = res.result.monthly_limit;
|
||||
return e.reply(`autotagger: usage/limit: ${processed}/${limit}`);
|
||||
}
|
||||
return;
|
||||
break;
|
||||
case "help":
|
||||
e.reply("cmds: stats, limit, thumb, cache, uptime, restart, cleanTags, clearTmp, status");
|
||||
break;
|
||||
|
Reference in New Issue
Block a user