From 2f9795cdf84d8ef14661ad282d95ef10192f834b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aura=20Rom=C3=A1n?= Date: Mon, 29 Aug 2022 15:19:41 +0200 Subject: [PATCH] types(interactions): fix `{Slash,ContextMenu}CommandBuilder#toJSON` --- .../contextMenuCommands/ContextMenuCommandBuilder.ts | 4 ++-- .../src/interactions/slashCommands/SlashCommandBuilder.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts b/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts index 4deb42a26036..51003b2512f6 100644 --- a/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts +++ b/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts @@ -3,7 +3,7 @@ import type { LocaleString, LocalizationMap, Permissions, - RESTPostAPIApplicationCommandsJSONBody, + RESTPostAPIContextMenuApplicationCommandsJSONBody, } from 'discord-api-types/v10'; import { validateLocale, validateLocalizationMap } from '../slashCommands/Assertions.js'; import { @@ -176,7 +176,7 @@ export class ContextMenuCommandBuilder { * * **Note:** Calling this function will validate required properties based on their conditions. */ - public toJSON(): RESTPostAPIApplicationCommandsJSONBody { + public toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody { validateRequiredParameters(this.name, this.type); validateLocalizationMap(this.name_localizations); diff --git a/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts b/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts index fdfa4d3c1fa8..c7b88d094cc5 100644 --- a/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts +++ b/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts @@ -2,7 +2,7 @@ import type { APIApplicationCommandOption, LocalizationMap, Permissions, - RESTPostAPIApplicationCommandsJSONBody, + RESTPostAPIChatInputApplicationCommandsJSONBody, } from 'discord-api-types/v10'; import { mix } from 'ts-mixer'; import { @@ -69,7 +69,7 @@ export class SlashCommandBuilder { * * **Note:** Calling this function will validate required properties based on their conditions. */ - public toJSON(): RESTPostAPIApplicationCommandsJSONBody { + public toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody { validateRequiredParameters(this.name, this.description, this.options); validateLocalizationMap(this.name_localizations);