Skip to content

Commit

Permalink
refactor: remove redudant jumps
Browse files Browse the repository at this point in the history
Updates the logic for handling the connection embed color to use
the nullish coalescing operator to set the value to `{ unset: true }`
if no color is provided.

fix(hub): remove unnecessary return statement

Removes the unnecessary `return` statement at the end of the
`BlockWordCommand` class, as the function already returns a reply
to the user.
  • Loading branch information
dev-737 committed Oct 18, 2024
1 parent ca1dc61 commit 13d5073
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/slash/Main/connection/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default class ConnectionEditCommand extends Connection {

await updateConnection(
{ channelId: customId.args[0] },
{ embedColor: embedColor ? embedColor : { unset: true } },
{ embedColor: embedColor ?? { unset: true } },
);

await interaction.reply({
Expand Down
1 change: 0 additions & 1 deletion src/commands/slash/Main/hub/blockwords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,5 @@ export default class BlockWordCommand extends HubCommand {
'No block word rules are in this hub yet. Use `/hub blockwords add` to add some.',
{ ephemeral: true },
);
return;
}
}

0 comments on commit 13d5073

Please sign in to comment.