BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The node allows editing the text of a message in Bale Messenger, a messaging platform similar to Telegram. Specifically, for the "Edit Message Text" operation under the "Message" resource, it enables updating the content of an existing message or inline message by specifying new text and optional interface elements like keyboards.

This is useful in scenarios where you want to update information dynamically without sending a new message, such as correcting typos, updating status messages, or modifying interactive message content after user interaction.

Example use cases:

  • Updating a bot's response message with new data fetched from an API.
  • Changing the text of an inline message after a user presses a button.
  • Modifying a previously sent notification message to reflect a change in status.

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 to attach to the message. Options: Inline Keyboard, Reply Keyboard, Reply Keyboard Remove, or None.
Inline Keyboard Defines rows and buttons for an inline keyboard that appears next to the message. Each button can have text, callback data, or URL.
Reply Keyboard Defines rows and buttons for a custom reply keyboard with text buttons.
Reply Keyboard Remove Options to remove the custom keyboard, including whether to selectively remove it for specific users.

Output

The output JSON contains confirmation of the edited message with fields:

  • Text: The updated text of the message.
  • chat_id: The chat identifier where the message was edited.
  • message_id: The unique identifier of the edited message.

No binary data is output for this operation.

Dependencies

  • Requires an API authentication token credential for Bale Messenger.
  • Uses the Bale Messenger Bot API endpoint at https://tapi.bale.ai/bot.
  • Relies on the official node-telegram-bot-api library adapted for Bale Messenger API calls.
  • No additional environment variables are explicitly required beyond the API token credential.

Troubleshooting

  • Missing Required Parameters: Ensure that when editing an inline message, the Inline Message ID is provided; for normal messages, both Chat ID and Message ID must be specified.
  • Invalid Text Content: The Text property must not be empty; otherwise, the API may reject the request.
  • API Errors: If the Bale Messenger API returns errors (e.g., message not found, insufficient permissions), check that the bot has access to the chat and message.
  • Silent Edit Not Working: If Disable Notification is set but notifications still appear with sound, verify client-side settings and API support for silent edits.
  • Reply Markup Issues: Incorrectly structured keyboards may cause the API to reject the request. Use the provided UI options to build valid keyboards.

Links and References

Discussion