Something went wrong. Try again.
A Discord bot designed to entertain your server esmbot.net
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738import { Buffer } from "node:buffer";import { createRequire } from "node:module";import { getEnv } from "./runtime.ts";import type { MediaParams, MediaTypes } from "./types.ts";
export interface FuncObject { name: string; input: boolean; anim?: boolean;}
export interface MediaLib { funcs: { image: FuncObject[]; };
process( type: MediaTypes, cmd: string, params: MediaParams["params"], input: { data?: ArrayBuffer; type?: string; }, ): Promise<{ data: Buffer; type: string }>; init(): { image?: string[]; }; shutdown(): void; trim(): number;}
const nodeRequire = createRequire(import.meta.url);const debug = getEnv("DEBUG");const relPath = `../../build/${debug && debug === "true" ? "Debug" : "Release"}/esmbmedia.node`;
export const media = nodeRequire(relPath) as MediaLib;