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

Callers 3

distributePrizesFunction · 0.85
performLotteryDrawFunction · 0.85
lotteryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected