support managed APIs

This commit is contained in:
nin0dev 2025-01-23 03:59:34 -05:00
parent 5cd3917d22
commit d3b66640fc
Signed by: nin0
SSH key fingerprint: SHA256:Is2DvJdw1OkSopR4wKJfdWV0fZhMLxpnCs1P1nPhIgA

View file

@ -6,7 +6,6 @@
import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext, findOption, sendBotMessage } from "@api/Commands"; import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext, findOption, sendBotMessage } from "@api/Commands";
import { DataStore } from "@api/index"; import { DataStore } from "@api/index";
import { addAccessory } from "@api/MessageAccessories";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Parser, React, Text } from "@webpack/common"; import { Parser, React, Text } from "@webpack/common";
@ -90,9 +89,9 @@ export default definePlugin({
userFlags = new Map<string, Flag>(savedFlags); userFlags = new Map<string, Flag>(savedFlags);
} }
} }
addAccessory("flag", (props: Record<string, any>) => ( },
<Flag id={props.message.author.id} /> renderMessageAccessory: (props: Record<string, any>) => {
), 4); return <Flag id={props.message.author.id} />;
}, },
commands: [ commands: [
{ {