mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
provide reply context to gemini
This commit is contained in:
parent
9b4173a28a
commit
548588224a
1 changed files with 10 additions and 0 deletions
|
@ -32,6 +32,16 @@ module.exports = {
|
|||
|
||||
let input = args.text;
|
||||
|
||||
// Get content if the user replies to anything
|
||||
if(context.message.messageReference) {
|
||||
let msg = await context.message.channel.fetchMessage(context.message.messageReference.messageId);
|
||||
|
||||
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; }
|
||||
}
|
||||
|
||||
console.log(input)
|
||||
|
||||
try{
|
||||
await editOrReply(context, createEmbed("ai_custom", context, STATIC_ICONS.ai_bard))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue