TypeError: nsfwjs.load 不是一个函数
interface NSFWPrediction { className: string; probability: number; }
export class Manager extends Client { db!: QuickDB; token: string; canvas: Canvas; replicate: Replicate | null; metadata: Metadata; config: Config; logger: any; owner: string; color: ColorResolvable; prefix: string; shard_status: boolean; slash: Collection<string, SlashCommand>; commands: Collection<string, PrefixCommand>; aliases: Collection<string, string>; cluster?: ClusterClient; nsfwModel: nsfw.NSFWJS | null = null; constructor() { super({ shards: process.env.IS_SHARING === "true" ? getInfo().SHARD_LIST : "auto", shardCount: process.env.IS_SHARING === "true" ? getInfo().TOTAL_SHARDS : 1, allowedMentions: { parse: ["roles", "users", "everyone"], repliedUser: false, }, intents: configData.features.MESSAGE_CONTENT.enable ? [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, ] : [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildMessages, ], });
this.logger = loggerService;
this.config = configData;
this.metadata = new ManifestService().data.metadata.bot;
}
this.token = this.config.bot.TOKEN; this.owner = this.config.bot.OWNER_ID; this.color = (this.config.bot.EMBED_COLOR || "#2b2d31") as ColorResolvable; this.prefix = this.config.features.MESSAGE_CONTENT.commands.prefix || "d!";
this.shard_status = false; this.canvas = new Canvas(); this.slash = new Collection(); this.commands = new Collection(); this.aliases = new Collection();
this.replicate = new Replicate({ …
内容来源: infinitered/nsfwjs