Module Events
Updated: 2025-07-03 14:46:06
1. Platform Lottery Available
Description: This event is triggered when a platform lottery activity is detected.
Event: LuckyLotteryEvent.OnLuckyLottery
Callback Parameters: null
Example:
luckyLotteryTarget.eventEmitter.on(LuckyLotteryEvent.OnLuckyLottery, () => {
console.log('检测到平台抽奖活动');
});
2. No Lottery Activity
Description: This event is triggered when no platform lottery activity is detected.
Event: LuckyLotteryEvent.OffLuckyLottery
Callback Parameters: null
Example:
luckyLotteryTarget.eventEmitter.on(LuckyLotteryEvent.OffLuckyLottery, () => {
console.log('当前没有平台抽奖活动');
});
3. Lottery Starts
Description: This event is triggered when a platform lottery activity begins.
Event: LuckyLotteryEvent.StartLuckyLottery
Callback Parameters: Object object, detailed type description as follows
| Property Name | Description | Type |
|---|---|---|
activityId |
- | number |
Example:
luckyLotteryTarget.eventEmitter.on(LuckyLotteryEvent.StartLuckyLottery, (data) => {
console.log('平台抽奖开始,活动ID:', data.activityId);
});
4. Lottery Ends
Description: This event is triggered when a platform lottery activity ends.
Event: LuckyLotteryEvent.StopLuckyLottery
Callback Parameters: Object object, detailed type description as follows
| Property Name | Description | Type |
|---|---|---|
activityId |
- | number |
Example:
luckyLotteryTarget.eventEmitter.on(LuckyLotteryEvent.StopLuckyLottery, (data) => {
console.log('平台抽奖结束,活动ID:', data.activityId);
});
