This commit is contained in:
Sqaaakoi 2024-10-17 17:42:42 +13:00
parent bffa2a128e
commit 3b7c752adb
No known key found for this signature in database

View file

@ -88,7 +88,7 @@ export default definePlugin({
if (typeof savedFlags === "string") { if (typeof savedFlags === "string") {
userFlags = new Map<string, Flag>(JSON.parse(savedFlags)); userFlags = new Map<string, Flag>(JSON.parse(savedFlags));
} else { } else {
userFlags = new Map(savedFlags); userFlags = new Map<string, Flag>(savedFlags);
} }
} }
addAccessory("flag", (props: Record<string, any>) => ( addAccessory("flag", (props: Record<string, any>) => (
@ -108,9 +108,9 @@ export default definePlugin({
required: true required: true
}, },
{ {
"name": "type", name: "type",
"type": ApplicationCommandOptionType.STRING, type: ApplicationCommandOptionType.STRING,
"description": "The type of flag to add", description: "The type of flag to add",
choices: Object.entries(flagRegistry).map(([key, flag]) => ({ choices: Object.entries(flagRegistry).map(([key, flag]) => ({
name: key, name: key,
label: flag.label, label: flag.label,