适配乐鸟无e.bot,fix #42

This commit is contained in:
yeyang
2023-04-18 11:54:07 +08:00
parent c8658a05e6
commit e8106a98fb
4 changed files with 5 additions and 4 deletions

View File

@@ -526,7 +526,7 @@ export class GroupAdmin extends plugin {
// 浏览器截图
let screenshot = await puppeteer.Webpage({
url: `https://qun.qq.com/interactive/honorlist?gc=${e.group_id}&type=1&_wv=3&_wwv=129`,
headers: { Cookie: e.bot.cookies['qun.qq.com'] },
headers: { Cookie: (e.bot ?? Bot).cookies['qun.qq.com'] },
font: true
})
if (screenshot) return e.reply(screenshot)
@@ -570,7 +570,7 @@ export class GroupAdmin extends plugin {
// 图片截图
let screenshot = await puppeteer.Webpage({
url: `https://qun.qq.com/m/qun/activedata/speaking.html?gc=${e.group_id}&time=${/(7|)/.test(e.msg) ? 1 : 0}`,
headers: { Cookie: e.bot.cookies['qun.qq.com'] },
headers: { Cookie: (e.bot ?? Bot).cookies['qun.qq.com'] },
font: true
})
if (screenshot) return e.reply(screenshot)

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

@@ -1,5 +1,5 @@
.container {
background: url("https://api.gmit.vip/Api/DmImg?format=image") white center top no-repeat;
background: url("https://t.lizi.moe/mp") white center top no-repeat;
background-size: cover;
}

View File

@@ -6,7 +6,8 @@
{{block 'main'}}
<div class="box">
<div class="tb">
<img src="{{portrait}}" alt="头像" onerror="this.src= '{{_res_path}}img/tb.png'; this.onerror = null;">
<img src="{{portrait}}" alt="头像"
onerror="this.src= '{{_res_path}}state/img/default_avatar.png'; this.onerror = null;">
<div class="header">
<h1>{{nickname}}</h1>
<hr noshade>