mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
适配Trss (#575)
* fix: 修复星火api上下文 * 将无星火ck的情况降低为warn * feat: 添加星火设定自定义代码功能 * 修复星火api模式的一些问题 * 修复导出配置问题 * feat:添加工具箱快捷登录接口 * 添加工具箱快捷登录指令 * 阻止群聊使用快捷登录 * 添加Azure配置支持,修复重复的配置项冲突 * 移除旧版本渲染和新版本帮助 * 添加工具箱 * 更新工具箱替换原有后台 * 更新工具箱适配代码 * 后台适配Trss * 修复trss不支持sendPrivateMsg的问题 * 优化路由 * 修复路由 * 适配其他uin
This commit is contained in:
parent
64f2699b22
commit
0f9c8a7abe
10 changed files with 73 additions and 37 deletions
|
|
@ -2,7 +2,7 @@ import plugin from '../../../lib/plugins/plugin.js'
|
|||
import fs from 'fs'
|
||||
import _ from 'lodash'
|
||||
import { Config } from '../utils/config.js'
|
||||
import { getMasterQQ, limitString, makeForwardMsg, maskQQ } from '../utils/common.js'
|
||||
import { getMasterQQ, limitString, makeForwardMsg, maskQQ, getUin } from '../utils/common.js'
|
||||
import { deleteOnePrompt, getPromptByName, readPrompts, saveOnePrompt } from '../utils/prompts.js'
|
||||
import AzureTTS from "../utils/tts/microsoft-azure.js";
|
||||
export class help extends plugin {
|
||||
|
|
@ -246,7 +246,7 @@ export class help extends plugin {
|
|||
async removeSharePrompt (e) {
|
||||
let master = (await getMasterQQ())[0]
|
||||
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 || (getUin(e) + '')}`, {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'FROM-CHATGPT': 'ikechan8370'
|
||||
|
|
@ -354,7 +354,7 @@ export class help extends plugin {
|
|||
let toUploadBody = {
|
||||
title: currentUse,
|
||||
prompt: content,
|
||||
qq: master || (Bot.uin + ''), // 上传者设定为主人qq或机器人qq
|
||||
qq: master || (getUin(this.e) + ''), // 上传者设定为主人qq或机器人qq
|
||||
use: extraData.use === 'Custom' ? 'Sydney' : 'ChatGPT',
|
||||
r18,
|
||||
description
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue