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

Function updateWinnerStatusByUser

lottery/lottery.ts:488–498  ·  view source on GitHub ↗
(lotteryId: number, userId: string, status: PrizeStatus, claimedAt?: number)

Source from the content-addressed store, hash-verified

486 WHERE lottery_id = ? AND user_id = ?
487 `);
488 const result = stmt.run(status, claimedAt || Date.now(), lotteryId, userId);
489 return result.changes > 0;
490}
491
492function getWinnerStatusIcon(status: string): string {
493 switch (status) {
494 case PrizeStatus.SENT:
495 return "✅";
496 case PrizeStatus.PENDING:
497 return "⏳";
498 case PrizeStatus.EXPIRED:
499 return "❌";
500 default:
501 return "❓";

Callers 1

lotteryFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected