Bot API 10.2 ephemeral messages carry ephemeral_message_id instead of an ordinary message_id, and it's the only handle for editEphemeralMessageText. @gramio/types 10.2.0 already types the field on TelegramMessage, but contexts (0.9.0) has no getter, so a callback handler that wants to edit the tapped ephemeral view in place has to read the raw payload.
We're shimming it locally in the meantime. Suggested shape, mirroring threadId / db7bf0f:
src/structures/message.ts:
/** For ephemeral messages, identifier of the ephemeral message inside this chat (Bot API 10.2). */
@Inspect({ nullable: false })
get ephemeralMessageId() {
return this.payload.ephemeral_message_id;
}
src/contexts/callback-query.ts, next to threadId:
/** Identifier of the originating ephemeral message, or undefined for an ordinary one. The only
* handle for editing the tapped ephemeral view in place (editEphemeralMessageText). */
get ephemeralMessageId() {
return this.message?.ephemeralMessageId;
}
Needs the @gramio/types dep at ^10.2.0 for the field's typing.
Bot API 10.2 ephemeral messages carry
ephemeral_message_idinstead of an ordinarymessage_id, and it's the only handle foreditEphemeralMessageText.@gramio/types10.2.0 already types the field onTelegramMessage, but contexts (0.9.0) has no getter, so a callback handler that wants to edit the tapped ephemeral view in place has to read the raw payload.We're shimming it locally in the meantime. Suggested shape, mirroring
threadId/ db7bf0f:src/structures/message.ts:src/contexts/callback-query.ts, next tothreadId:Needs the
@gramio/typesdep at^10.2.0for the field's typing.