feat: Implement custom error classes, a Drizzle transaction utility, and update Discord.js ephemeral message flags.
This commit is contained in:
@@ -3,6 +3,7 @@ import { DrizzleClient } from "@/lib/DrizzleClient";
|
||||
import { economyService } from "@/modules/economy/economy.service";
|
||||
import { inventoryService } from "@/modules/inventory/inventory.service";
|
||||
import { itemTransactions } from "@/db/schema";
|
||||
import type { Transaction } from "@/lib/types";
|
||||
|
||||
export class TradeService {
|
||||
private static sessions = new Map<string, TradeSession>();
|
||||
@@ -136,7 +137,7 @@ export class TradeService {
|
||||
this.endSession(threadId);
|
||||
}
|
||||
|
||||
private static async processTransfer(tx: any, from: TradeParticipant, to: TradeParticipant, threadId: string) {
|
||||
private static async processTransfer(tx: Transaction, from: TradeParticipant, to: TradeParticipant, threadId: string) {
|
||||
// 1. Money
|
||||
if (from.offer.money > 0n) {
|
||||
await economyService.modifyUserBalance(
|
||||
|
||||
Reference in New Issue
Block a user