Skip to content

Commit

Permalink
Update build.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
TastyPumPum committed Feb 27, 2024
1 parent b388544 commit 6d18070
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mahoji/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export const buildCommand: OSBMahojiCommand = {
required: true,
autocomplete: async (value: string, user: User) => {
const mUser = await mUserFetch(user.id);
const conLevel = mUser.skillLevel('construction');
const hasCrystalSaw = mUser.owns('Crystal saw');
const conLevel = mUser.skillLevel('construction') + (hasCrystalSaw ? 3 : 0);
return Constructables.filter(i => (!value ? true : i.name.toLowerCase().includes(value.toLowerCase())))

Check warning on line 56 in src/mahoji/commands/build.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Unexpected string value in conditional. An explicit empty string check is required

Check warning on line 56 in src/mahoji/commands/build.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Unexpected string value in conditional. An explicit empty string check is required
.filter(c => c.level <= conLevel)
.map(i => ({
Expand Down

0 comments on commit 6d18070

Please sign in to comment.