mirror of
https://gitlab.com/qwerinope/qweribot.git
synced 2026-02-04 13:36:58 +01:00
move itemuses to a seperate table, finish !stats implementation
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { HelixUser } from "@twurple/api"
|
||||
import { changeBalance, getInventory, updateInventory } from "../lib/userHelper"
|
||||
import { addUsedItem, changeBalance, getInventory, updateInventory } from "../lib/userHelper"
|
||||
import { timeout, addTimeoutToDB, vulnerableUsers } from "./timeoutHelper"
|
||||
import api, { broadcasterApi } from "./api"
|
||||
|
||||
@@ -22,6 +22,7 @@ export async function changeItemCount(user: HelixUser, item: string, amount = -1
|
||||
value: newcount,
|
||||
})
|
||||
await updateInventory(user, inv)
|
||||
await addUsedItem(user, item)
|
||||
return { result: true, reason: '', count: inv[item] }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user