From 58e8e5c6eaaf57ead8afcf9dd82b1feb94096ffe Mon Sep 17 00:00:00 2001 From: pinks Date: Mon, 11 Sep 2023 18:03:07 +0200 Subject: [PATCH] deps --- bot/mod.ts | 2 +- bot/txt2imgCommand.ts | 5 +++-- deps.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bot/mod.ts b/bot/mod.ts index 71e8184..ecd33ce 100644 --- a/bot/mod.ts +++ b/bot/mod.ts @@ -62,7 +62,7 @@ bot.api.setMyCommands([ bot.command("start", (ctx) => ctx.reply("Hello! Use the /txt2img command to generate an image")); bot.command("txt2img", txt2imgCommand); -bot.use(txt2imgQuestion.middleware() as any); +bot.use(txt2imgQuestion.middleware()); bot.command("queue", queueCommand); diff --git a/bot/txt2imgCommand.ts b/bot/txt2imgCommand.ts index 0ced217..08c393d 100644 --- a/bot/txt2imgCommand.ts +++ b/bot/txt2imgCommand.ts @@ -4,11 +4,11 @@ import { jobStore } from "../db/jobStore.ts"; import { parsePngInfo } from "../sd.ts"; import { Context, logger } from "./mod.ts"; -export const txt2imgQuestion = new GrammyStatelessQ.StatelessQuestion( +export const txt2imgQuestion = new GrammyStatelessQ.StatelessQuestion( "txt2img", async (ctx) => { if (!ctx.message.text) return; - await txt2img(ctx as any, ctx.message.text, false); + await txt2img(ctx, ctx.message.text, false); }, ); @@ -48,6 +48,7 @@ async function txt2img(ctx: Context, match: string, includeRepliedTo: boolean): const repliedToMsg = ctx.message.reply_to_message; const repliedToText = repliedToMsg?.text || repliedToMsg?.caption; if (includeRepliedTo && repliedToText) { + // TODO: remove bot command from replied to text const originalParams = parsePngInfo(repliedToText); params = { ...originalParams, diff --git a/deps.ts b/deps.ts index 5d89d00..66e6e5e 100644 --- a/deps.ts +++ b/deps.ts @@ -11,7 +11,7 @@ export * as GrammyTypes from "https://deno.land/x/grammy_types@v3.2.0/mod.ts"; export * as GrammyAutoQuote from "https://deno.land/x/grammy_autoquote@v1.1.2/mod.ts"; export * as GrammyParseMode from "https://deno.land/x/grammy_parse_mode@1.7.1/mod.ts"; export * as GrammyKvStorage from "https://deno.land/x/grammy_storages@v2.3.1/denokv/src/mod.ts"; -export * as GrammyStatelessQ from "npm:@grammyjs/stateless-question"; +export * as GrammyStatelessQ from "https://deno.land/x/grammy_stateless_question_alpha@v3.0.3/mod.ts"; export * as FileType from "npm:file-type@18.5.0"; // @deno-types="./types/png-chunks-extract.d.ts" export * as PngChunksExtract from "npm:png-chunks-extract@1.0.0";