Repository navigation
feat: /help in Telegram, and a hint for messages the bot does not handle - #38
Merged
Merged
Conversation
/help from the owner, in the owner's chat, gets a fixed list: the commands, the instance names, what Apply and Skip do, and the pullgate status commands for the host. Any other text from the owner gets "Not a command. Send /help for the list." Each reply is sent at most once per minute. Others get no answer. Fixes #26 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #26
What changes
/helpfrom the owner, in the owner's chat, not edited, gets a fixed list:/check,/check NAME,/help, the instance names, what Apply and Skip do, and the root commandspullgate status NAME,--pause,--resume,--ask-again. The listener cannot read root's files, so it does not show the mode or the pause state; the list points topullgate status NAMEfor them.setMyCommands(optional in the issue) is not done.Tests
TestHelp: the owner gets the list, it names each instance, it holds no token and no path, and a second/helpwithin a minute gets nothing.TestHintOncePerMinute: other text gets the hint once; a second one in the same minute gets nothing; after a minute it comes again; a stranger's message does not use up the hint.TestHelpAndHintNotForOthers:/helpand other text from another user, another chat, or edited get no reply.TestCheckCommandsThatDoNotCount: updated,hello,please /checkand/CHECKfrom the owner now get the hint.Reviews
Security review: no critical, high or medium findings. Fixed:
/helpis limited too, and clearer--ask-againwording. Not changed:/help@BotNamegets the hint, as/check@botgets the usage text today (the listener does not know its own bot name); an owner message without text (a photo) gets the hint, at most once a minute.Correctness review: no bug found. Added the stranger test, and the host value in T19.
🤖 Generated with Claude Code