forked from syntaxbullet/AuroraBot-discord
feat: Introduce success and info embeds, add related user tracking to economy transactions, and refine trade interaction feedback and thread cleanup.
This commit is contained in:
@@ -159,7 +159,7 @@ export const economyService = {
|
||||
}
|
||||
},
|
||||
|
||||
modifyUserBalance: async (id: string, amount: bigint, type: string, description: string, tx?: any) => {
|
||||
modifyUserBalance: async (id: string, amount: bigint, type: string, description: string, relatedUserId?: string | null, tx?: any) => {
|
||||
const execute = async (txFn: any) => {
|
||||
if (amount < 0n) {
|
||||
// Check sufficient funds if removing
|
||||
@@ -180,6 +180,7 @@ export const economyService = {
|
||||
|
||||
await txFn.insert(transactions).values({
|
||||
userId: BigInt(id),
|
||||
relatedUserId: relatedUserId ? BigInt(relatedUserId) : null,
|
||||
amount: amount,
|
||||
type: type,
|
||||
description: description,
|
||||
|
||||
Reference in New Issue
Block a user