Skip to content

Commit

Permalink
fix(normalizeInputs): bring back the defaulting I removed (#701)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu authored Dec 9, 2023
1 parent 422a338 commit 0e04eb3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/utils/application-commands/normalizeInputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ function isBuilder(
function addDefaultsToChatInputJSON(data: RESTPostAPIChatInputApplicationCommandsJSONBody): RESTPostAPIChatInputApplicationCommandsJSONBody {
data.dm_permission ??= true;
data.type ??= ApplicationCommandType.ChatInput;
data.default_member_permissions ??= null;

return data;
}

function addDefaultsToContextMenuJSON(data: RESTPostAPIContextMenuApplicationCommandsJSONBody): RESTPostAPIContextMenuApplicationCommandsJSONBody {
data.dm_permission ??= true;
data.default_member_permissions ??= null;

return data;
}
Expand Down

0 comments on commit 0e04eb3

Please sign in to comment.