Closed y0unghe closed 4 months ago
This is incorrect. The API does support it, and the types are correct, too: https://github.com/grammyjs/types/blob/1211b7917873ba3c0f52167227d21094fe0887df/methods.ts#L1331
The
editMessageText
fromContext
editMessageText(text: string, other?: Other<"editMessageText", "chat_id" | "message_id" | "inline_message_id" | "text">, signal?: AbortSignal): Promise<true | (Update.Edited & Message.CommonMessage & { text: string; })>;
You even found the correct type signature, just call await ctx.editMessageText("hi", { parse_mode: "HTML" })
. Have you tried that?
The
editMessageText
fromContext
editMessageText(text: string, other?: Other<"editMessageText", "chat_id" | "message_id" | "inline_message_id" | "text">, signal?: AbortSignal): Promise<true | (Update.Edited & Message.CommonMessage & { text: string; })>;
You even found the correct type signature, just call
await ctx.editMessageText("hi", { parse_mode: "HTML" })
. Have you tried that?
Yeah, I tried to add parse_mode but there are compile errors. It seems there is no such key.
If you expect help, you need to share both your code and the full error message ... not sure what this whole issue is about
Closing due to inactivity
I'm trying to edit the message with HTML text, but the API doesn't support the
parse_mode
.The
editMessageText
fromContext
Please add
parse_mode
toeditMessageText
function.