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

Function getLotteryWinners

lottery/lottery.ts:414–425  ·  view source on GitHub ↗
(lotteryId: number)

Source from the content-addressed store, hash-verified

412 FROM lottery_winners w
413 LEFT JOIN lottery_participants p ON w.user_id = p.user_id AND w.lottery_id = p.lottery_id
414 WHERE w.lottery_id = ?
415 ORDER BY w.assigned_at
416 `);
417 return stmt.all(lotteryId);
418}
419
420// User validation functions
421async function validateUserConditions(client: TelegramClient, user: any, lottery: any, chatId: string): Promise<{ valid: boolean; reason?: string }> {
422 try {
423 // Check if user is a bot
424 if (!lottery.allow_bots && user.bot) {
425 return { valid: false, reason: "机器人不允许参与抽奖" };
426 }
427
428 // Check avatar requirement

Callers 3

distributePrizesFunction · 0.85
performLotteryDrawFunction · 0.85
lotteryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected