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