From 8acfbafe16579c8e2148fdd6d06b73481187e67b Mon Sep 17 00:00:00 2001 From: Hitmare Date: Sun, 24 Sep 2023 21:53:03 +0000 Subject: [PATCH] Adding "help" function to txt2img Base form of the "help" function in txt2img --- bot/txt2imgCommand.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/bot/txt2imgCommand.ts b/bot/txt2imgCommand.ts index c4f10a0..30c63aa 100644 --- a/bot/txt2imgCommand.ts +++ b/bot/txt2imgCommand.ts @@ -67,6 +67,28 @@ async function txt2img(ctx: ErisContext, match: string, includeRepliedTo: boolea params = parsePngInfo(match, params); + if (ctx.message.text.trim() == "help") { + await ctx.reply(` + Usage: /txt2img [options] + <>: required + []: optional + available options: + + negative: + steps: + detail: + size:x + upscale: + denoising: between 0 and 1 with two decimal places + + Example: + /txt2img dog, anthro, woodland steps:40 detail:7 size:500x600 upscale:2 denoising:0.57 negative:badyiffymix, boring_e621_fluffyrock_v4 + `, { + reply_to_message_id: ctx.message?.message_id, + }); + } + + if (!params.prompt) { await ctx.reply( "Please tell me what you want to see." +