Skip to content

Chat ID Parameter and Aliases#138

Open
scartill wants to merge 6 commits intorahiel:masterfrom
scartill:master
Open

Chat ID Parameter and Aliases#138
scartill wants to merge 6 commits intorahiel:masterfrom
scartill:master

Conversation

@scartill
Copy link

@scartill scartill commented Mar 8, 2026

Summary

This Pull Request introduces the ability to send messages to specific chat IDs or predefined aliases without modifying the configuration file. It also adds support for securely configuring the bot token via an environment variable.

Changes

  • New CLI Arguments:

    • --chat-id <ID>: Sends a message directly to the specified chat ID, overriding the configured one.
    • --alias <ALIAS>: Sends a message to a predefined alias mapping (stored in the [aliases] block in the configuration file).
  • Environment Variable for Bot Token:

    • Added support for the TELEGRAM_BOT_TOKEN environment variable.
    • Using --configure with this variable set bypasses the interactive prompt, allowing for secure token usage without storing it in a plain-text configuration file.
  • Documentation Updates:

    • Updated README.md to document the new --chat-id and --alias features, along with an example [aliases] block configuration.
    • Updated README.md to document the new TELEGRAM_BOT_TOKEN environment variable behavior.

google-labs-jules bot and others added 6 commits March 7, 2026 19:01
- Add `--chat-id <chat-id>` flag to override the default chat id.
- Add `--alias <string>` flag to use predefined chat ids from the `[aliases]` config section.
- Support negative chat IDs by correctly casting them to integers.
- Update `README.md` with usage and configuration examples.

Co-authored-by: scartill <1055918+scartill@users.noreply.github.com>
…110979254301145609

Add `--chat-id` and `--alias` CLI parameters
Allow configuring and running telegram-send using the
TELEGRAM_BOT_TOKEN environment variable to avoid storing the bot token
in a plain-text configuration file.

Co-authored-by: scartill <1055918+scartill@users.noreply.github.com>
Allow configuring and running telegram-send using the
TELEGRAM_BOT_TOKEN environment variable to avoid storing the bot token
in a plain-text configuration file. Also amend README.md to document
the new usage.

Co-authored-by: scartill <1055918+scartill@users.noreply.github.com>
…7065284436081288010

feat: use TELEGRAM_BOT_TOKEN environment variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant