Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Mar 1, 2024
1 parent 860c057 commit 8267a6a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/mahoji/lib/abstracted_commands/farmingCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function harvestCommand({
', '
)}. *Don't include numbers, this command harvests all crops available of the specified patch type.*`;
}
const { patchesDetailed } = await getFarmingInfo(user.id);
const { patchesDetailed, patches } = await getFarmingInfo(user.id);
const patch = patchesDetailed.find(i => i.patchName === seedType)!;
if (patch.ready === null) return 'You have nothing planted in those patches.';

Expand Down Expand Up @@ -106,9 +106,9 @@ ${boostStr.length > 0 ? '**Boosts**: ' : ''}${boostStr.join(', ')}`;

await addSubTaskToActivityTask<FarmingActivityTaskOptions>({
plantsName: patch.lastPlanted,
patchType: patch,
patchType: patches[patch.patchName],
userID: user.id,
channelID: channelID.toString(),
channelID,
upgradeType,
duration,
quantity: patch.lastQuantity,
Expand Down Expand Up @@ -164,7 +164,7 @@ export async function farmingPlantCommand({
return `${user.minionName} needs ${plant.level} Farming to plant ${plant.name}.`;
}

const { patchesDetailed } = await getFarmingInfo(user.id);
const { patchesDetailed, patches } = await getFarmingInfo(user.id);
const patchType = patchesDetailed.find(i => i.patchName === plant.seedType)!;

const timePerPatchTravel = Time.Second * plant.timePerPatchTravel;
Expand Down Expand Up @@ -302,7 +302,7 @@ export async function farmingPlantCommand({

await addSubTaskToActivityTask<FarmingActivityTaskOptions>({
plantsName: plant.name,
patchType,
patchType: patches[plant.seedType],
userID: user.id,
channelID: channelID.toString(),
quantity,
Expand Down

0 comments on commit 8267a6a

Please sign in to comment.