"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.apply = void 0;
const koishi_1 = require("koishi");
const sdoFF14Data_1 = require("./lib/API/sdoFF14Data");
const serverStatus_1 = require("./lib/canvas/serverStatus");
function apply(ctx) {
    ctx.command("ffxiv.server")
        .alias("服务器状态")
        .alias("绝育查询")
        .action(async () => {
        const serverStatus = await (0, sdoFF14Data_1.getServers)();
        if (typeof serverStatus !== "string") {
            const image = await (0, serverStatus_1.drawServerStatus)(serverStatus.Data);
            return (0, koishi_1.segment)("image", { url: "base64://" + image.toString("base64") });
        }
        return;
    });
}
exports.apply = apply;
