fix: reply in html
This commit is contained in:
parent
9dc01a59be
commit
001c524d73
@ -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 { TELEGRAM_API_KEY } from "@lib/env.ts";
|
||||||
import { transcribe } from "@lib/openai.ts";
|
import { transcribe } from "@lib/openai.ts";
|
||||||
import { createDocument } from "@lib/documents.ts";
|
import { createDocument } from "@lib/documents.ts";
|
||||||
|
import { renderMarkdown } from "@lib/documents.ts";
|
||||||
|
|
||||||
const bot = new Bot(TELEGRAM_API_KEY);
|
const bot = new Bot(TELEGRAM_API_KEY);
|
||||||
|
|
||||||
@ -81,7 +82,7 @@ bot.command("end", async (ctx) => {
|
|||||||
await createDocument(task.noteName, finalNote, "text/markdown");
|
await createDocument(task.noteName, finalNote, "text/markdown");
|
||||||
delete activeTasks[ctx.chat.id.toString()];
|
delete activeTasks[ctx.chat.id.toString()];
|
||||||
await ctx.reply("Note complete. Here is your markdown:");
|
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) {
|
} catch (error) {
|
||||||
console.error("Error creating document:", error);
|
console.error("Error creating document:", error);
|
||||||
await ctx.reply("Error creating document:");
|
await ctx.reply("Error creating document:");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user