mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
use context awareness for gpt
This commit is contained in:
parent
4d1c0115bf
commit
9e43244d25
1 changed files with 2 additions and 5 deletions
|
@ -44,11 +44,8 @@ module.exports = {
|
|||
if(context.message.messageReference) {
|
||||
let msg = await context.message.channel.fetchMessage(context.message.messageReference.messageId);
|
||||
|
||||
if(msg.content && msg.content.length) input = msg.content
|
||||
else if(msg.embeds?.length) for(const e of msg.embeds) if(e[1].description?.length) { input = e[1].description; break; }
|
||||
|
||||
prompt = args.text
|
||||
if(args.prompt !== "") return editOrReply(context, createEmbed("warning", context, `Prompt parameter is unsupported for message replies.`))
|
||||
if(msg.content && msg.content.length) input = `> ${msg.content.split("\n").join("\n> ")}\n${input}`
|
||||
if(msg.embeds?.length) for(const e of msg.embeds) if(e[1].description?.length) { input = `> ${e[1].description.split("\n").join("\n> ")}\n${input}`; break; }
|
||||
}
|
||||
|
||||
try{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue