Repository navigation
Conversation
mysubcult
force-pushed
the
feat/topic-command-menu
branch
2 times, most recently
from
October 24, 2026 06:40
8a605b1 to
4fb2b5b
Compare
In an operator topic "/name" now works as the LHC bot command "!name": GenericCommand rewrites the update and hands it to GenericmessageCommand, so the existing command flow is reused. Which commands the "/" menu of the operators group shows is a new bot option (lhc_telegram_bot.topic_commands, comma separated), descriptions come from the LHC commands, followed by /ban and /endchat. The menu is re-sent (setMyCommands, chat scope) only when it changed; cron/sync_commands forces it. Unknown commands in a group are ignored instead of «Command not found». Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mysubcult
force-pushed
the
feat/topic-command-menu
branch
from
October 24, 2026 07:15
f13ed98 to
9237358
Compare
Both PRs add a column to lhc_telegram_bot; this resolves the overlap so LiveHelperChat#99 merges cleanly after LiveHelperChat#97.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Operators who answer from Telegram topics can use LHC bot commands (
!name), but have to remember and type them. Telegram has a native command menu (the/button), so this PR connects the two.How it works
/name(or/name@bot, with arguments) works exactly like!namefor any LHC bot command.GenericCommandreceives unknown commands; when the name matches an LHC bot command it rewrites the update text to!name …and hands it toGenericmessageCommand, so the existing!flow (bot trigger, internal message, topic echo) is reused unchanged. Works for every LHC command, listed in the menu or not.Telegram => Bots => Edit): a comma separated list of LHC bot command names. They are shown in that order as/name — description(description =info_msgof the LHC command, else its name), followed by/banand/endchat. Registered withsetMyCommandsfor the operators group only (scope: chat). Nothing in LHC core settings is used for this.cache/telegram_topic_commands_<bot>.md5) and re-sent only when it changed. An empty option leaves the group menu untouched (or removes the menu the extension sent before).php cron.php -s site_admin -e lhctelegram -c cron/sync_commandsforces it.Command /x not found.. :((e.g. when someone types a command in General).lhc_telegram_bot.topic_commandsinstructure.json/install.sql.🤖 Generated with Claude Code