mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: 设定管理增加机器人qq的fallback
This commit is contained in:
parent
1f58ac5476
commit
11735ead3b
1 changed files with 2 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}?`, {
|
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'
|
||||||
|
|
@ -340,7 +340,7 @@ export class help extends plugin {
|
||||||
let toUploadBody = {
|
let toUploadBody = {
|
||||||
title: currentUse,
|
title: currentUse,
|
||||||
prompt: content,
|
prompt: content,
|
||||||
qq: (await getMasterQQ())[0], // 上传者设定为主人qq而不是机器人qq
|
qq: (await getMasterQQ())[0] || Bot.uin, // 上传者设定为主人qq或机器人qq
|
||||||
use: extraData.use === 'Custom' ? 'Sydney' : 'ChatGPT',
|
use: extraData.use === 'Custom' ? 'Sydney' : 'ChatGPT',
|
||||||
r18,
|
r18,
|
||||||
description
|
description
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue