Skip to content

feat: /help in Telegram, and a hint to it for any message the bot does not handle #26

Closed

Description

@groupsky

Problem

The bot knows only /check and /check NAME (and the buttons). It does not tell the owner what it can do. Any other text from the owner is dropped with only a journal line (msg="message ignored" reason="not a command"), so from the phone it looks as if the bot is dead.

Seen on 2026-11-16 in the first real use of v0.1.0.

Proposal

  • /help (from the owner, in the owner's chat) answers with a short list: the commands (/check, /check NAME), the instances of this listener with their mode (ask / auto / off) and, if the listener can know it, paused or not; what Apply and Skip do; and the root commands for the host (pullgate status NAME, --pause, --resume, --ask-again).
  • Any other text from the owner in that chat gets one short reply: "Not a command. Send /help for the list." Rate-limit it (for example at most one such reply per minute), so a stuck client or a long paste cannot make the bot flood the chat.
  • Messages from anyone else, or in another chat, stay ignored with no reply (as now): the bot must not tell strangers that it exists or what it runs.
  • Register the commands with setMyCommands (scope: the owner's chat only), so Telegram shows them in the menu. Optional.

Done when

  • A test with the fake Telegram server: /help from the owner gets the list, and the list names each instance.
  • A test: other text from the owner gets the hint once; a second one in the same minute gets nothing.
  • A test: /help and other text from a different user or chat get no reply.
  • README "Check now" (or a new "Commands" section) lists /help.
  • THREAT-MODEL.md: the help text holds no secret and no host detail beyond the instance names and the host value that each question already shows.

Activity

  1. groupsky commented on Nov 17, 2026

    @groupsky
    ContributorAuthor

    Done in #38 (squash commit c341ec1).

    • /help from the owner gets the list, which names each instance: TestHelp in internal/listener/listener_test.go (fake Telegram server, two instances; also no token, no path; a second /help within a minute gets nothing).
    • Other text gets the hint once, a second one in the same minute gets nothing: TestHintOncePerMinute (also: a stranger's message does not use up the hint; after a minute it comes again).
    • /help and other text from another user or chat (or edited) get no reply: TestHelpAndHintNotForOthers.
    • README: new section "Commands: /help".
    • THREAT-MODEL.md T19 "What the bot tells".

    The listener cannot read root's files, so the list does not show mode or pause; it points to pullgate status NAME. setMyCommands (optional) is not done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: lowDo when nothing else waits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions