BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The "Edit Message Text" operation of the Message resource in this BaleMessenger node allows users to modify the text content of an existing message sent via Bale Messenger. This can be applied to either a standard chat message or an inline message (a message sent via inline mode).

This operation is useful when you want to update or correct the content of a message after it has been sent, for example:

  • Correcting typos or updating information in a previously sent message.
  • Dynamically changing message content based on user interaction or external events.
  • Updating inline messages that are part of interactive bot responses.

Properties

Name Meaning
Message Type The type of the message to edit. Options: Inline Message (an inline message identified by Inline Message ID), or Message (a regular chat message).
Inline Message ID Unique identifier of the inline message to edit. Required if Message Type is Inline Message.
Chat ID Unique identifier for the target chat where the message was sent. Required if Message Type is Message.
Message ID Unique identifier of the message to edit. Required if Message Type is Message.
Text The new text content to set for the message.
Disable Notification Whether to send the edited message silently (users receive notification without sound).
Reply Markup Additional interface options for the message's reply interface. Options include: Inline Keyboard, Reply Keyboard, Reply Keyboard Remove, or None. These define custom keyboards or inline buttons attached to the message.
Inline Keyboard Defines rows and buttons for an inline keyboard attached to the message. Each button can have label text and optional callback data or URL.
Reply Keyboard Defines rows and buttons for a custom reply keyboard with reply options.
Reply Keyboard Remove Options to remove a custom reply keyboard, including whether to selectively remove it for specific users.

Output

The output JSON contains details about the edited message:

  • For editing a standard message, the output includes:

    • Text: The updated text content.
    • chat_id: The chat identifier where the message was edited.
    • message_id: The unique identifier of the edited message.
  • For inline messages, the node calls the API to edit the message text but does not explicitly return detailed response data in the output JSON.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Bale Messenger API authentication token configured in the node credentials.
  • Uses the official Bale Messenger Bot API endpoint (https://tapi.bale.ai/bot) to perform the edit operation.
  • No additional external services or environment variables are required beyond the API credential.

Troubleshooting

  • Missing Required Parameters: Ensure that when editing an inline message, the Inline Message ID is provided; when editing a normal message, both Chat ID and Message ID must be specified.
  • API Errors: If the API returns errors (e.g., message not found, insufficient permissions), verify that the bot has access to the chat and the message exists.
  • Silent Edit Not Working: The Disable Notification flag may not always suppress notifications depending on client behavior.
  • Invalid Reply Markup: Incorrectly structured reply markup (inline keyboard or reply keyboard) may cause the API call to fail. Validate the keyboard structure carefully.
  • Empty Text: The Text property must not be empty; otherwise, the API will reject the request.

Links and References


This summary focuses specifically on the "Edit Message Text" operation of the Message resource as requested.

Discussion