mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
style: 修改通知格式
This commit is contained in:
parent
b51882819a
commit
db7ba49ca1
12
lib/check.js
12
lib/check.js
@ -23,13 +23,13 @@ async function isMe(num, note = "无") {
|
||||
.slice(0, unread_at_num)
|
||||
.forEach(({ at_time, up_uname, business, source_content, url }) => {
|
||||
desp += '## [at]检测结果\n\n'
|
||||
desp += '----------------------------------------------------------------\n\n'
|
||||
desp += '- - - -\n\n'
|
||||
desp += `发生时间: ${new Date(at_time * 1000).toLocaleString()}\n\n`
|
||||
desp += `用户: ${up_uname}\n\n`
|
||||
desp += `在${business}中@了你(https://space.bilibili.com/${global_var.get("myUID")})\n\n`
|
||||
desp += `原内容为: ${source_content}\n\n`
|
||||
desp += `[直达链接](${url})\n\n`
|
||||
desp += '----------------------------------------------------------------\n\n'
|
||||
desp += '- - - -\n\n'
|
||||
});
|
||||
log.info('中奖检测', '--> OK');
|
||||
}
|
||||
@ -41,12 +41,12 @@ async function isMe(num, note = "无") {
|
||||
.forEach(({ nickname, uri, source, timestamp }) => {
|
||||
if (judge(source, notice_key_words)) {
|
||||
desp += '## 回复检测结果\n\n'
|
||||
desp += '----------------------------------------------------------------\n\n'
|
||||
desp += '- - - -\n\n'
|
||||
desp += `发生时间: ${new Date(timestamp * 1000).toLocaleString()}\n\n`
|
||||
desp += `用户: ${nickname}\n\n`
|
||||
desp += `回复你(https://space.bilibili.com/${global_var.get("myUID")})说:\n${source}\n\n`
|
||||
desp += `[直达链接](${uri})\n\n`
|
||||
desp += '----------------------------------------------------------------\n\n'
|
||||
desp += '- - - -\n\n'
|
||||
}
|
||||
})
|
||||
log.info('中奖检测', '--> OK');
|
||||
@ -64,12 +64,12 @@ async function isMe(num, note = "无") {
|
||||
const content = await bili.fetch_session_msgs(talker_id, unread_count);
|
||||
if (judge(content, notice_key_words)) {
|
||||
desp += '## 私信检测结果\n\n'
|
||||
desp += '----------------------------------------------------------------\n\n'
|
||||
desp += '- - - -\n\n'
|
||||
desp += `发生时间: ${new Date(timestamp * 1000).toLocaleString()}\n\n`
|
||||
desp += `用户: ${sender_uid}\n\n`
|
||||
desp += `私信你(https://space.bilibili.com/${global_var.get("myUID")})说:\n${content}\n\n`
|
||||
desp += `[直达链接](https://message.bilibili.com/#/whisper/mid${sender_uid})\n\n`
|
||||
desp += '----------------------------------------------------------------\n\n'
|
||||
desp += '- - - -\n\n'
|
||||
}
|
||||
await bili.updateSessionStatus(talker_id, type, msg_seqno);
|
||||
await delay(update_session_wait);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user