Skip to content

Commit

Permalink
types(interactions): fix {Slash,ContextMenu}CommandBuilder#toJSON (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranet committed Sep 2, 2022
1 parent f77612a commit b7eb96d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -3,7 +3,7 @@ import type {
LocaleString,
LocalizationMap,
Permissions,
RESTPostAPIApplicationCommandsJSONBody,
RESTPostAPIContextMenuApplicationCommandsJSONBody,
} from 'discord-api-types/v10';
import { validateLocale, validateLocalizationMap } from '../slashCommands/Assertions.js';
import {
Expand Down Expand Up @@ -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);
Expand Down
Expand Up @@ -2,7 +2,7 @@ import type {
APIApplicationCommandOption,
LocalizationMap,
Permissions,
RESTPostAPIApplicationCommandsJSONBody,
RESTPostAPIChatInputApplicationCommandsJSONBody,
} from 'discord-api-types/v10';
import { mix } from 'ts-mixer';
import {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b7eb96d

Please sign in to comment.