mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: 浏览设定页码
This commit is contained in:
parent
bfc55df6a6
commit
90a1f6a084
2 changed files with 9 additions and 3 deletions
|
|
@ -208,8 +208,8 @@ let helpData = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'confirm',
|
icon: 'confirm',
|
||||||
title: '#chatgpt浏览设定+关键词',
|
title: '#chatgpt浏览设定(+关键词)(页码X)',
|
||||||
desc: '搜索公开的设定'
|
desc: '搜索公开的设定。默认返回前十条,使用页码X可以翻页,使用关键词可以检索。页码从1开始。'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'confirm',
|
icon: 'confirm',
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,13 @@ export class help extends plugin {
|
||||||
|
|
||||||
async browsePrompt (e) {
|
async browsePrompt (e) {
|
||||||
let search = e.msg.replace(/^#(chatgpt|ChatGPT)(在线)?(浏览|查找)设定/, '')
|
let search = e.msg.replace(/^#(chatgpt|ChatGPT)(在线)?(浏览|查找)设定/, '')
|
||||||
let response = await fetch('https://chatgpt.roki.best/prompt/list?search=' + search, {
|
let split = search.split('页码')
|
||||||
|
let page = 1
|
||||||
|
if (split.length > 1) {
|
||||||
|
search = split[0]
|
||||||
|
page = parseInt(split[1])
|
||||||
|
}
|
||||||
|
let response = await fetch('https://chatgpt.roki.best/prompt/list?search=' + search + `&page=${page - 1}`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'FROM-CHATGPT': 'ikechan8370'
|
'FROM-CHATGPT': 'ikechan8370'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue