diff options
author | Vendicated <vendicated@riseup.net> | 2022-11-18 23:29:34 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-11-18 23:29:34 +0100 |
commit | 43f41d20fa44c774aec1a62807bcbea180ec2eb7 (patch) | |
tree | 48d4d717ad552f144e2ee0b153947de7d194c634 /src/api/Commands | |
parent | 50c356e397157ae30712e350e5ccc6f2d9894c37 (diff) | |
download | Vencord-43f41d20fa44c774aec1a62807bcbea180ec2eb7.tar.gz Vencord-43f41d20fa44c774aec1a62807bcbea180ec2eb7.tar.bz2 Vencord-43f41d20fa44c774aec1a62807bcbea180ec2eb7.zip |
Fix commands showing up multiple times
Diffstat (limited to 'src/api/Commands')
-rw-r--r-- | src/api/Commands/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/Commands/index.ts b/src/api/Commands/index.ts index a20ac50..9fe2eb4 100644 --- a/src/api/Commands/index.ts +++ b/src/api/Commands/index.ts @@ -17,7 +17,7 @@ */ import { makeCodeblock } from "../../utils/misc"; -import { generateId, sendBotMessage } from "./commandHelpers"; +import { sendBotMessage } from "./commandHelpers"; import { ApplicationCommandInputType, ApplicationCommandOptionType, ApplicationCommandType, Argument, Command, CommandContext, Option } from "./types"; export * from "./commandHelpers"; @@ -136,7 +136,7 @@ export function registerCommand<C extends Command>(command: C, plugin: string) { throw new Error(`Command '${command.name}' already exists.`); command.isVencordCommand = true; - command.id ??= generateId(); + command.id ??= `-${BUILT_IN.length}`; command.applicationId ??= "-1"; // BUILT_IN; command.type ??= ApplicationCommandType.CHAT_INPUT; command.inputType ??= ApplicationCommandInputType.BUILT_IN_TEXT; |