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

Commit

Permalink
chore(deps): update dependency discord.js to ^14.13.0 (#91)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency discord.js to ^14.13.0

* fix: dependency update incompatibilty

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daan Klarenbeek <[email protected]>
  • Loading branch information
renovate[bot] and ijsKoud authored Aug 20, 2023
1 parent 14c4adb commit d2229e1
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 150 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"dependencies": {
"@snowcrystals/icicle": "^2.0.4",
"discord.js": "^14.11.0",
"discord.js": "^14.13.0",
"lodash": "^4.17.21"
},
"engines": {
Expand Down
11 changes: 8 additions & 3 deletions src/lib/handlers/CommandRegistryHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
type ApplicationCommandSubGroup,
ApplicationCommandType,
Collection,
PermissionsBitField
PermissionsBitField,
type ApplicationCommandSubCommand
} from "discord.js";
import { bold } from "colorette";
import _ from "lodash";
Expand Down Expand Up @@ -172,7 +173,10 @@ export class CommandRegistry {
return differences;
}

private optionsAreDifferent(discord: ApplicationCommandOption[], command: ApplicationCommandOption[]): Differences {
private optionsAreDifferent(
discord: (ApplicationCommandOption | ApplicationCommandSubCommand)[],
command: (ApplicationCommandOption | ApplicationCommandSubCommand)[]
): Differences {
const differences: Differences = [];

// Check Options length
Expand Down Expand Up @@ -244,7 +248,8 @@ export class CommandRegistry {
{
const disc = discord as ApplicationCommandSubGroup;
const cmd = command as ApplicationCommandSubGroup;
const optRes = this.optionsAreDifferent(disc.options ?? [], cmd.options ?? []);

const optRes = this.optionsAreDifferent((disc.options ?? []) as any, (cmd.options ?? []) as any);
differences.push(...optRes);
}
break;
Expand Down
Loading

0 comments on commit d2229e1

Please sign in to comment.