Skip to content

Commit

Permalink
docs: ts ignore 2 lines for website (#437)
Browse files Browse the repository at this point in the history
* docs: ts ignore 2 lines for website

I really hate to do this but typedoc is shitting itself with these
2 lines and this is the only way around it until the rewrite is done

* Update src/lib/utils/application-commands/normalizeInputs.ts
  • Loading branch information
favna authored May 15, 2022
1 parent c668f90 commit 0fbb4ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ export class ApplicationCommandRegistry {
guildId?: string
) {
try {
// @ts-expect-error Currently there's a discord-api-types version clash between builders and discord.js
// TODO (favna): Replace with ts-expect-error after website rewrite is done
// @ts-ignore Currently there's a discord-api-types version clash between builders and discord.js
const result = await commandsManager.create(apiData, guildId);

this.info(
Expand Down
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 @@ -121,6 +121,8 @@ export function convertApplicationCommandToApiData(command: ApplicationCommand):
if (command.type === 'CHAT_INPUT') {
returnData.type = ApplicationCommandType.ChatInput;
(returnData as RESTPostAPIChatInputApplicationCommandsJSONBody).description = command.description;
// TODO (favna): Remove this line after website rewrite is done
// @ts-ignore this is currently ignored for the website
(returnData as RESTPostAPIChatInputApplicationCommandsJSONBody).description_localizations = command.descriptionLocalizations;
} else if (command.type === 'MESSAGE') {
returnData.type = ApplicationCommandType.Message;
Expand Down

0 comments on commit 0fbb4ff

Please sign in to comment.