取消买单活动通知背景边框
This commit is contained in:
@@ -2631,6 +2631,7 @@
|
|||||||
// 游戏/商店播报(百家乐/赛马/神秘箱子/双色球/五子棋/老虎机/商店购买):参照钓鱼播报的普通样式,无背景色
|
// 游戏/商店播报(百家乐/赛马/神秘箱子/双色球/五子棋/老虎机/商店购买):参照钓鱼播报的普通样式,无背景色
|
||||||
const content = msg.content || '';
|
const content = msg.content || '';
|
||||||
const isRedPacketClaimNotification = content.includes('抢到了') && content.includes('礼包');
|
const isRedPacketClaimNotification = content.includes('抢到了') && content.includes('礼包');
|
||||||
|
const isBaccaratLossCoverNotification = content.includes('【你玩游戏我买单】') || content.includes('金币补偿');
|
||||||
const isPlainNotification =
|
const isPlainNotification =
|
||||||
content.includes('【百家乐】') ||
|
content.includes('【百家乐】') ||
|
||||||
content.includes('【赛马】') ||
|
content.includes('【赛马】') ||
|
||||||
@@ -2640,14 +2641,14 @@
|
|||||||
content.includes('【老虎机】') ||
|
content.includes('【老虎机】') ||
|
||||||
content.includes('购买了'); // 商店购买通知
|
content.includes('购买了'); // 商店购买通知
|
||||||
|
|
||||||
if (isRedPacketClaimNotification) {
|
if (isRedPacketClaimNotification || isBaccaratLossCoverNotification) {
|
||||||
// 礼包领取播报:保留系统传音文字,不再使用提示条背景和边框。
|
// 礼包领取和买单活动播报:保留系统传音文字,不再使用提示条背景和边框。
|
||||||
let redPacketClaimContent = msg.content;
|
let plainAccentContent = msg.content;
|
||||||
redPacketClaimContent = redPacketClaimContent.replace(/【([^】]+)】/g, function(match, uName) {
|
plainAccentContent = plainAccentContent.replace(/【([^】]+)】/g, function(match, uName) {
|
||||||
return '【' + clickableUser(uName, '#000099') + '】';
|
return '【' + clickableUser(uName, '#000099') + '】';
|
||||||
});
|
});
|
||||||
html =
|
html =
|
||||||
`<span style="color: #b45309;">🌟 ${redPacketClaimContent}</span>`;
|
`<span style="color: #b45309;">🌟 ${plainAccentContent}</span>`;
|
||||||
} else if (isPlainNotification) {
|
} else if (isPlainNotification) {
|
||||||
// 游戏/商店播报:普通样式(参照钓鱼播报),无背景色无边框
|
// 游戏/商店播报:普通样式(参照钓鱼播报),无背景色无边框
|
||||||
let parsedContent = msg.content;
|
let parsedContent = msg.content;
|
||||||
|
|||||||
Reference in New Issue
Block a user