Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
fix(CommandRegistryHandler): updates even without difference
Browse files Browse the repository at this point in the history
  • Loading branch information
ijsKoud committed Dec 3, 2022
1 parent 0faa1a0 commit 6bad844
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/handlers/CommandRegistryHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class CommandRegistry {
*/
private isDifferent(discord: ApplicationCommand, command: Command): string | null {
if (!_.isEqual(discord.nameLocalizations, command.nameLocalizations ?? null)) return "nameLocalizations";
if (!_.isEqual(discord.descriptionLocalizations, command.descriptions ?? null)) return "descriptionLocalizations";
if (!_.isEqual(discord.descriptionLocalizations ?? {}, command.descriptions)) return "descriptionLocalizations";
if (discord.description !== command.description) return "description";

if (discord.dmPermission !== command.permissions.dm) return "dmPermission";
Expand Down
2 changes: 1 addition & 1 deletion src/structures/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export interface CommandOptions {
nameLocalizations?: Partial<Record<Locale, string>>;
/** The default description of the command. */
description: string;
/** A small description about the command. The English translation will also be used as default description. */
/** Localized version of description. */
descriptions?: Partial<Record<Locale, string>>;
/** Options users have to pass through before sending the command
* @default []
Expand Down

0 comments on commit 6bad844

Please sign in to comment.