1
0
forked from pinks/eris

Compare commits

..

2 Commits

Author SHA1 Message Date
d1dec46e9d fix: use exifreader for png info
- replace pnginfo module
- allow jpeg for tag extraction
- rename pnginfo to getprompt
2023-11-10 23:33:03 +00:00
5a66c4fe29 change txt2img seed behaviour
will ignore seed only on /txt2img or new requests
2023-11-09 23:25:14 +00:00

View File

@ -64,13 +64,22 @@ async function txt2img(ctx: ErisContext, match: string, includeRepliedTo: boolea
} }
const repliedToText = repliedToMsg?.text || repliedToMsg?.caption; const repliedToText = repliedToMsg?.text || repliedToMsg?.caption;
if (includeRepliedTo && repliedToText) { const isReply = includeRepliedTo && repliedToText;
if (isReply) {
// TODO: remove bot command from replied to text // TODO: remove bot command from replied to text
params = parsePngInfo(repliedToText, params); params = parsePngInfo(repliedToText, params);
} }
params = parsePngInfo(match, params, true); 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) { if (!params.prompt) {
await ctx.reply( await ctx.reply(
"Please tell me what you want to see." + "Please tell me what you want to see." +