Compare commits
3 Commits
fad14f685e
...
ffd3d0dc8d
Author | SHA1 | Date |
---|---|---|
pinks | ffd3d0dc8d | |
pinks | ec4a3c893e | |
pinks | e7d292df60 |
|
@ -40,7 +40,9 @@ export async function getConfig(): Promise<Config> {
|
||||||
export async function setConfig(newConfig: Partial<Config>): Promise<void> {
|
export async function setConfig(newConfig: Partial<Config>): Promise<void> {
|
||||||
const oldConfig = await getConfig();
|
const oldConfig = await getConfig();
|
||||||
const config: Config = {
|
const config: Config = {
|
||||||
pausedReason: newConfig.pausedReason ?? oldConfig.pausedReason,
|
pausedReason: newConfig.pausedReason === undefined
|
||||||
|
? oldConfig.pausedReason
|
||||||
|
: newConfig.pausedReason,
|
||||||
maxUserJobs: newConfig.maxUserJobs ?? oldConfig.maxUserJobs,
|
maxUserJobs: newConfig.maxUserJobs ?? oldConfig.maxUserJobs,
|
||||||
maxJobs: newConfig.maxJobs ?? oldConfig.maxJobs,
|
maxJobs: newConfig.maxJobs ?? oldConfig.maxJobs,
|
||||||
defaultParams: newConfig.defaultParams ?? oldConfig.defaultParams,
|
defaultParams: newConfig.defaultParams ?? oldConfig.defaultParams,
|
||||||
|
|
|
@ -129,7 +129,7 @@ async function img2img(
|
||||||
chat: ctx.message.chat,
|
chat: ctx.message.chat,
|
||||||
requestMessage: ctx.message,
|
requestMessage: ctx.message,
|
||||||
replyMessage: replyMessage,
|
replyMessage: replyMessage,
|
||||||
}, { retryCount: 3, repeatDelayMs: 10_000 });
|
}, { priority: 0, retryCount: 3, repeatDelayMs: 10_000 });
|
||||||
|
|
||||||
debug(`Generation (img2img) enqueued for ${formatUserChat(ctx.message)}`);
|
debug(`Generation (img2img) enqueued for ${formatUserChat(ctx.message)}`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ async function pnginfo(ctx: ErisContext, includeRepliedTo: boolean): Promise<voi
|
||||||
const buffer = await fetch(file.getUrl()).then((resp) => resp.arrayBuffer());
|
const buffer = await fetch(file.getUrl()).then((resp) => resp.arrayBuffer());
|
||||||
const info = getPngInfo(buffer);
|
const info = getPngInfo(buffer);
|
||||||
if (!info) {
|
if (!info) {
|
||||||
return await ctx.reply(
|
return void await ctx.reply(
|
||||||
"No info found in file.",
|
"No info found in file.",
|
||||||
omitUndef({ reply_to_message_id: ctx.message?.message_id }),
|
omitUndef({ reply_to_message_id: ctx.message?.message_id }),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue