Skip to content

Commit 02ab2e8

Browse files
committed
feat: add supoprt for qouted message in roast
1 parent e9aef4e commit 02ab2e8

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/commands/roast.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@ export default async function (msg: Message): Promise<void> {
1919
return;
2020
}
2121

22-
const mentioned = msg.mentionedIds.length > 0;
22+
let quotedMessage: Message | null = null;
23+
24+
if (msg.hasQuotedMsg) {
25+
quotedMessage = await msg.getQuotedMessage();
26+
}
2327

28+
const mentioned = msg.mentionedIds.length > 0;
2429
const prompt = `You are Roast — your job is to roast people for fun.
2530
No hard feelings, you’re just doing your job 😈🔥
2631
You can use funny or nasty emojis, but keep it light-hearted and witty.
2732
Always respond briefly and concisely.
28-
The date today is %_TODAY_%.
33+
The date today is %_TODAY_%. If there was no enought topic to roast, create one.
2934
${mentioned ? "You may also mention users using @." : ""}
30-
If there was no topic to roast, create one.
35+
${quotedMessage ? `Quoted Message:\n${quotedMessage.body}\n` : ""}
3136
Now roast: ${query}`;
3237

3338
let text = await agentHandler(prompt);

0 commit comments

Comments
 (0)