mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -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) {
|
if(context.message.messageReference) {
|
||||||
let msg = await context.message.channel.fetchMessage(context.message.messageReference.messageId);
|
let msg = await context.message.channel.fetchMessage(context.message.messageReference.messageId);
|
||||||
|
|
||||||
if(msg.content && msg.content.length) input = msg.content
|
if(msg.content && msg.content.length) input = `> ${msg.content.split("\n").join("\n> ")}\n${input}`
|
||||||
else if(msg.embeds?.length) for(const e of msg.embeds) if(e[1].description?.length) { input = e[1].description; break; }
|
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; }
|
||||||
|
|
||||||
prompt = args.text
|
|
||||||
if(args.prompt !== "") return editOrReply(context, createEmbed("warning", context, `Prompt parameter is unsupported for message replies.`))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue