mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 修复过长设定发不出来的。后续用图片
This commit is contained in:
parent
c781df07a1
commit
83c789baf4
3 changed files with 13 additions and 4 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 { makeForwardMsg } from '../utils/common.js'
|
||||
import {limitString, makeForwardMsg} from '../utils/common.js'
|
||||
import { getPromptByName, readPrompts, saveOnePrompt } from '../utils/prompts.js'
|
||||
export class help extends plugin {
|
||||
constructor (e) {
|
||||
|
|
@ -63,7 +63,8 @@ export class help extends plugin {
|
|||
}
|
||||
prompts.push(...[defaultPrompt, defaultSydneyPrompt])
|
||||
prompts.push(...readPrompts())
|
||||
e.reply(await makeForwardMsg(e, prompts.map(p => `《${p.name}》\n${p.content}`), '设定列表'))
|
||||
console.log(prompts)
|
||||
e.reply(await makeForwardMsg(e, prompts.map(p => `《${p.name}》\n${limitString(p.content, 500)}`), '设定列表'))
|
||||
}
|
||||
|
||||
async detailPrompt (e) {
|
||||
|
|
@ -85,7 +86,7 @@ export class help extends plugin {
|
|||
return
|
||||
}
|
||||
}
|
||||
await e.reply(`《${prompt.name}》\n${prompt.content}`, true)
|
||||
await e.reply(`《${prompt.name}》\n${limitString(p.content, 500)}`, true)
|
||||
}
|
||||
|
||||
async usePrompt (e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue