fix: dont inline the image in telegram response
This commit is contained in:
parent
46519ef1ea
commit
a414a80766
@ -63,9 +63,7 @@ bot.command("end", async (ctx) => {
|
||||
task.noteName.replace(/\.md$/, "")
|
||||
}/photo-${photoIndex}.jpg`;
|
||||
|
||||
finalNote += `))
|
||||
})\n\n`;
|
||||
finalNote += `**Photo**:\n ${photoUrl}\n\n`;
|
||||
photoTasks.push({
|
||||
content: entry.content as Uint8Array,
|
||||
path: photoUrl,
|
||||
@ -80,11 +78,17 @@ 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);
|
||||
await ctx.reply(finalNote, { parse_mode: "MarkdownV2" });
|
||||
} catch (error) {
|
||||
console.error("Error creating document:", error);
|
||||
await ctx.reply("Error creating document:");
|
||||
await ctx.reply(JSON.stringify(error));
|
||||
if (error instanceof Error) {
|
||||
await ctx.reply(error?.toString());
|
||||
}else if (error instanceof Response) {
|
||||
await ctx.reply(error?.statusText);
|
||||
}else if (typeof error === "string") {
|
||||
await ctx.reply(error);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user