Skip to content

Commit

Permalink
Track christmas cracker opens (#6178)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwjgit authored Nov 7, 2024
1 parent b9403d6 commit ffb52a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mahoji/lib/abstracted_commands/crackerCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Bank, LootTable } from 'oldschooljs';

import { Emoji } from '../../../lib/constants';
import { handleMahojiConfirmation } from '../../../lib/util/handleMahojiConfirmation';
import { addToOpenablesScores } from '../../mahojiSettings';

const HatTable = new LootTable()
.add('Red partyhat', 1, 32)
Expand Down Expand Up @@ -56,6 +57,7 @@ export async function crackerCommand({
const [winner, loser] = shuffleArr([otherPerson, owner]);
await winner.addItemsToBank({ items: winnerLoot, collectionLog: true });
await loser.addItemsToBank({ items: loserLoot, collectionLog: true });
await addToOpenablesScores(owner, new Bank().add('Christmas cracker', 1).freeze());

return `${Emoji.ChristmasCracker} ${owner} pulled a Christmas cracker with ${otherPerson} and....\n\n ${winner} received ${winnerLoot}, ${loser} received ${loserLoot}.`;
}

0 comments on commit ffb52a1

Please sign in to comment.