fix: reply in html

This commit is contained in:
max_richter 2025-05-09 19:57:18 +02:00
parent 9dc01a59be
commit 001c524d73
Signed by: max
GPG Key ID: 51973802EF3F77C5

View File

@ -2,6 +2,7 @@ import { Bot } from "https://deno.land/x/grammy@v1.36.1/mod.ts";
import { TELEGRAM_API_KEY } from "@lib/env.ts";
import { transcribe } from "@lib/openai.ts";
import { createDocument } from "@lib/documents.ts";
import { renderMarkdown } from "@lib/documents.ts";
const bot = new Bot(TELEGRAM_API_KEY);
@ -81,7 +82,7 @@ bot.command("end", async (ctx) => {
await createDocument(task.noteName, finalNote, "text/markdown");
delete activeTasks[ctx.chat.id.toString()];
await ctx.reply("Note complete. Here is your markdown:");
await ctx.reply(finalNote, { parse_mode: "MarkdownV2" });
await ctx.reply(renderMarkdown(finalNote), { parse_mode: "HTML" });
} catch (error) {
console.error("Error creating document:", error);
await ctx.reply("Error creating document:");