import type { FansMedal } from '@laplace.live/internal' /** * Super chat message * * 醒目留言 * * @see BilibiliInternal.WebSocket.Prod.SUPER_CHAT_MESSAGE for the original version * @see BilibiliInternal.WebSocket.OpenPlatform.LIVE_OPEN_PLATFORM_SUPER_CHAT for the Open Platform version */ export interface SuperChat { type: 'superchat' /** * 在极端情况下,例如直播间开启了全员 SC 审核,那么会导致 id 重复,因此需要从 `data.id` * 中获取唯一识别符,在开放平台中为 `data.message_id` */ id: string origin: number originIdx: number uid: number username: string avatar: string avatarFrame: string message: string /** Message color in HEX format */ messageColor: string /** * SC 翻译正文 * * 用户勾选翻译的话可用,目前为日文 * * 如果直播间见开启了 SC 全局审核,那么所有的 SC 都会自动附上翻译,需要通过 `transMark` 判断 * 是否真的开启了 SC 翻译 */ messageTrans: string /** * 是否开启翻译 * * - 0: 未开启翻译 * - 1: 已开启翻译 */ transMark: number /** * 是否是被审核过的 SC * * - 0: 无审核 * - 1: 已审核 */ isAudited: number price: number /** * 实际货币单位的价格 */ priceNormalized: number /** * 举报 SC 时会用到 */ token: string /** 未知 */ rate: number /** How long this SC will appear in seconds */ duration: number timestamp: number timestampNormalized: number /** * 0: 白字 * 1: 总督 * 2: 提督 * 3: 舰长 */ guardType: number guardBackground: string scId: number scName: string scAmount: number /** Color in HEX */ // scBgBottomColor: string /** Color in HEX */ // scBgColor: string /** Color in HEX */ // scBgColorEnd: string /** Color in HEX */ // scBgColorStart: string /** Color in HEX */ // scBgPriceColor: string medal: FansMedal read: boolean /** * 该 SC 是否被删除,由 `SUPER_CHAT_MESSAGE_DELETE` 事件触发 */ deleted: boolean }