MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / consumePrize

Function consumePrize

lottery/lottery.ts:267–277  ·  view source on GitHub ↗
(prizeId: number)

Source from the content-addressed store, hash-verified

265 WHERE id = ? AND stock_count > 0
266 `);
267 const result = stmt.run(prizeId);
268 return result.changes > 0;
269}
270
271function clearWarehouse(warehouseName: string): number {
272 if (!db) return 0;
273
274 const stmt = db.prepare(`
275 DELETE FROM prize_warehouse
276 WHERE warehouse_name = ?
277 `);
278 const result = stmt.run(warehouseName);
279 return result.changes;
280}

Callers 1

distributePrizesFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected