use context awareness for gpt

This commit is contained in:
bignutty 2025-04-20 17:17:01 +02:00
parent 4d1c0115bf
commit 9e43244d25

View file

@ -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{