fix: 浏览设定页码

This commit is contained in:
ikechan8370 2023-03-26 16:27:33 +08:00
parent bfc55df6a6
commit 90a1f6a084
2 changed files with 9 additions and 3 deletions

View file

@ -339,7 +339,13 @@ export class help extends plugin {
async browsePrompt (e) {
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',
headers: {
'FROM-CHATGPT': 'ikechan8370'