mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: qq号格式问题
This commit is contained in:
parent
9c3d1bc5e4
commit
f71f1d7ed7
2 changed files with 113 additions and 2 deletions
|
|
@ -237,7 +237,7 @@ export class help extends plugin {
|
||||||
async removeSharePrompt (e) {
|
async removeSharePrompt (e) {
|
||||||
let master = (await getMasterQQ())[0]
|
let master = (await getMasterQQ())[0]
|
||||||
let name = e.msg.replace(/^#(chatgpt|ChatGPT)(删除|取消|撤销)共享设定/, '')
|
let name = e.msg.replace(/^#(chatgpt|ChatGPT)(删除|取消|撤销)共享设定/, '')
|
||||||
let response = await fetch(`https://chatgpt.roki.best/prompt?name=${name}&qq=${master || Bot.uin}?`, {
|
let response = await fetch(`https://chatgpt.roki.best/prompt?name=${name}&qq=${master || (Bot.uin + '')}?`, {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: {
|
headers: {
|
||||||
'FROM-CHATGPT': 'ikechan8370'
|
'FROM-CHATGPT': 'ikechan8370'
|
||||||
|
|
@ -323,6 +323,10 @@ export class help extends plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
async uploadPromptR18 () {
|
async uploadPromptR18 () {
|
||||||
|
let master = (await getMasterQQ())[0]
|
||||||
|
if (Config.debug) {
|
||||||
|
logger.mark('主人qq号:' + master)
|
||||||
|
}
|
||||||
if (this.e.msg.trim() === '取消') {
|
if (this.e.msg.trim() === '取消') {
|
||||||
await redis.del('CHATGPT:UPLOAD_PROMPT')
|
await redis.del('CHATGPT:UPLOAD_PROMPT')
|
||||||
await this.reply('已取消上传', true)
|
await this.reply('已取消上传', true)
|
||||||
|
|
@ -340,7 +344,7 @@ export class help extends plugin {
|
||||||
let toUploadBody = {
|
let toUploadBody = {
|
||||||
title: currentUse,
|
title: currentUse,
|
||||||
prompt: content,
|
prompt: content,
|
||||||
qq: (await getMasterQQ())[0] || Bot.uin, // 上传者设定为主人qq或机器人qq
|
qq: master || (Bot.uin + ''), // 上传者设定为主人qq或机器人qq
|
||||||
use: extraData.use === 'Custom' ? 'Sydney' : 'ChatGPT',
|
use: extraData.use === 'Custom' ? 'Sydney' : 'ChatGPT',
|
||||||
r18,
|
r18,
|
||||||
description
|
description
|
||||||
|
|
|
||||||
107
resources/help/help.html
Normal file
107
resources/help/help.html
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>bangzhu</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<div class="title">
|
||||||
|
ChatGPT-Plugin v2.4.9 帮助
|
||||||
|
</div>
|
||||||
|
<div class="chart" id="chart">
|
||||||
|
<div class="block"></div>
|
||||||
|
<div class="block"></div>
|
||||||
|
<div class="block"></div>
|
||||||
|
<div class="block"></div>
|
||||||
|
<div class="block"></div>
|
||||||
|
<div class="block"></div>
|
||||||
|
<div class="block"></div>
|
||||||
|
<div class="block"></div>
|
||||||
|
<div class="block"></div>
|
||||||
|
<div class="block"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<style>
|
||||||
|
.container {
|
||||||
|
width: 700px;
|
||||||
|
background: #6B84FF;
|
||||||
|
border-radius: 5px;
|
||||||
|
background: url("../img/icon/chatgpt.png");
|
||||||
|
min-height: 1000px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 1500px 1500px;
|
||||||
|
background-position: -100px 0;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
padding-top: 20px;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: bolder;
|
||||||
|
font-family: "Josefin Sans", sans-serif;
|
||||||
|
color: #e7fff4;
|
||||||
|
text-align: center;
|
||||||
|
background-image: -webkit-linear-gradient(left, #ffffff, #ecfffd, #d9ffec);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.chart {
|
||||||
|
border-radius: 5px;
|
||||||
|
width: 620px;
|
||||||
|
margin-left: 45px;
|
||||||
|
background: inherit;
|
||||||
|
min-height: 800px;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
box-shadow: 0 0 15px 15px #d8e1ff;
|
||||||
|
/*filter: blur(10px);*/
|
||||||
|
}
|
||||||
|
.chart:before {
|
||||||
|
border-radius: 5px;
|
||||||
|
content: '';
|
||||||
|
width: 630px;
|
||||||
|
height: 100%;
|
||||||
|
background: inherit;
|
||||||
|
position: absolute;
|
||||||
|
left: 35px;
|
||||||
|
/*right: 0;*/
|
||||||
|
top: 100px;
|
||||||
|
/*bottom: 0;*/
|
||||||
|
/*opacity: 0.9;*/
|
||||||
|
/*box-shadow: inset 0 0 0 200px rgba(255,255,255,0.3);*/
|
||||||
|
filter: blur(10px);
|
||||||
|
}
|
||||||
|
.block {
|
||||||
|
width: 151px;
|
||||||
|
height: 200px;
|
||||||
|
border: #b7c7ff solid 2px;
|
||||||
|
position: absolute;
|
||||||
|
box-shadow: 0 0 3px 3px #d8e1ff;
|
||||||
|
/*border-radius: 2px;*/
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
const chart = document.getElementById('chart');
|
||||||
|
const block = chart.querySelectorAll('.block');
|
||||||
|
|
||||||
|
const chartWidth = chart.offsetWidth;
|
||||||
|
const chartHeight = chart.offsetHeight;
|
||||||
|
|
||||||
|
const blockWidth = block[0].offsetWidth;
|
||||||
|
const blockHeight = block[0].offsetHeight;
|
||||||
|
|
||||||
|
const blocksPerRow = Math.floor(chartWidth / blockWidth);
|
||||||
|
const rows = Math.ceil(block.length / blocksPerRow);
|
||||||
|
|
||||||
|
for (let i = 0; i < block.length; i++) {
|
||||||
|
const row = Math.floor(i / blocksPerRow);
|
||||||
|
const col = i % blocksPerRow;
|
||||||
|
|
||||||
|
block[i].style.top = (row * blockHeight) + 'px';
|
||||||
|
block[i].style.left = (col * blockWidth) + 'px';
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue