@laplace.live/event-types
    Preparing search index...

    Interface Gift

    interface Gift {
        avatar: string;
        bizSource: string;
        blindGift: null | SEND_GIFT_BLIND_GIFT;
        coinType: string;
        duration: number;
        giftAction: string;
        giftAmount: number;
        giftIcon: string;
        giftId: number;
        giftName: string;
        giftRemain: number;
        giftType: number;
        guardType: number;
        id: string;
        medal: FansMedal;
        message: string;
        origin: number;
        originIdx: number;
        price: number;
        priceNormalized: number;
        read: boolean;
        receiver: {
            master: null | { room_id: number; uid: number; uname: string };
            uid: number;
            uname: string;
        };
        timestamp: number;
        timestampNormalized: number;
        type: "gift";
        uid: number;
        username: string;
        wealthMedalLevel: number;
    }
    Index

    Properties

    avatar: string

    礼物会返回头像,直接使用以节约流量

    bizSource: string

    当前礼物所处的事务源

    • 'Live' - 普通直播
    • 'voice_chat_room' - 语音连麦,多人连麦时会影响 receiver,即 receive_user_info
    blindGift: null | SEND_GIFT_BLIND_GIFT
    coinType: string

    'gold': 金瓜子,现金购买 'silver': 银瓜子,兑换的礼物

    duration: number
    giftAction: string

    礼物动作名称,投喂,etc.

    giftAmount: number
    giftIcon: string

    Mar 26, 2025 之后加的,为了兼容之前的数据可能为空

    giftId: number
    giftName: string
    giftRemain: number

    被投喂礼物在当前用户包裹中剩余多少 0 可能代表非包裹礼物(需购买礼物)

    giftType: number

    未知,先预留

    guardType: number

    0: 白字 1: 总督 2: 提督 3: 舰长

    id: string

    礼物有可能会大量刷屏,因此 时间戳:房间:UID 可能会导致 React key 重复,因此需要额外 增加 combo_total_coin 来避免重复,在开放平台中,此字段为 combo_info.combo_count * combo_info.combo_base_num(连击次数 * 每次连击的礼物个数)

    medal: FansMedal
    message: string
    origin: number
    originIdx: number
    price: number

    包含了折扣(大航海折扣)后的礼物总价(单价 * 数量)

    priceNormalized: number

    实际货币单位的价格

    read: boolean
    receiver: {
        master: null | { room_id: number; uid: number; uname: string };
        uid: number;
        uname: string;
    }

    当前礼物的接收方,多人连麦时会与当前主播不同,可从 bizSource 进行判断

    timestamp: number
    timestampNormalized: number
    type: "gift"
    uid: number
    username: string
    wealthMedalLevel: number