forked from pinks/eris
1
0
Fork 0

change txt2img seed behaviour #2

Merged
nameless merged 1 commits from txt2img-seed into pr-main 2023-11-10 23:32:00 +00:00
1 changed files with 10 additions and 1 deletions
Showing only changes of commit 5a66c4fe29 - Show all commits

View File

@ -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." +