diff --git a/bot/txt2imgCommand.ts b/bot/txt2imgCommand.ts index 5a2be61..ccf7078 100644 --- a/bot/txt2imgCommand.ts +++ b/bot/txt2imgCommand.ts @@ -64,13 +64,22 @@ async function txt2img(ctx: ErisContext, match: string, includeRepliedTo: boolea } const repliedToText = repliedToMsg?.text || repliedToMsg?.caption; - if (includeRepliedTo && repliedToText) { + const isReply = includeRepliedTo && repliedToText; + + if (isReply) { // TODO: remove bot command from replied to text params = parsePngInfo(repliedToText, params); } params = parsePngInfo(match, params, true); + if (isReply) { + const parsedInfo = parsePngInfo(repliedToText, undefined); + if (parsedInfo.prompt !== params.prompt) { + params.seed = parsedInfo.seed ?? -1; + } + } + if (!params.prompt) { await ctx.reply( "Please tell me what you want to see." +