fix(commands): fill new required properties
required and tested for 247207 closes #81
This commit is contained in:
parent
4b94b7fd9c
commit
32afc78e0a
2 changed files with 4 additions and 0 deletions
|
|
@ -54,7 +54,9 @@ export function registerCommand(command: BunnyApplicationCommand): () => void {
|
|||
command.type ??= ApplicationCommandType.CHAT;
|
||||
command.inputType = ApplicationCommandInputType.BUILT_IN;
|
||||
command.displayName ??= command.name;
|
||||
command.untranslatedName ??= command.name;
|
||||
command.displayDescription ??= command.description;
|
||||
command.untranslatedDescription ??= command.description;
|
||||
|
||||
if (command.options) for (const opt of command.options) {
|
||||
opt.displayName ??= opt.name;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ export interface ApplicationCommand {
|
|||
applicationId?: string;
|
||||
displayName?: string;
|
||||
displayDescription?: string;
|
||||
untranslatedDescription?: string;
|
||||
untranslatedName?: string;
|
||||
inputType?: ApplicationCommandInputType;
|
||||
type?: ApplicationCommandType;
|
||||
__bunny?: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue