feat(telegram): add member-info action to get chat administrators#14224
Open
ivan-andreyev wants to merge 1 commit intoopenclaw:mainfrom
Open
feat(telegram): add member-info action to get chat administrators#14224ivan-andreyev wants to merge 1 commit intoopenclaw:mainfrom
ivan-andreyev wants to merge 1 commit intoopenclaw:mainfrom
Conversation
- Add getChatMembersTelegram() function in telegram/send.ts using Telegram Bot API getChatAdministrators - Add memberInfo action handler in telegram-actions.ts - Register member-info action in actions/telegram.ts - Add memberInfo option to TelegramActionConfig type Use case: Agent can call message(action='member-info', chatId='...') to get list of chat administrators for tagging. Note: Telegram Bot API only provides getChatAdministrators (admins), not full member list. Returns: id, username, firstName, lastName, isBot, status for each administrator.
| } | ||
|
|
||
| if (action === "memberInfo") { | ||
| if (!isActionEnabled("memberInfo")) { |
Contributor
There was a problem hiding this comment.
Default value mismatch: isActionEnabled("memberInfo") defaults to true (enabled), but the corresponding gate("memberInfo", false) in telegram.ts:63 defaults to false (disabled). This means the action won't appear in listActions unless explicitly enabled, but the handler gate will pass even when unconfigured. Should match the sticker pattern and pass false:
Suggested change
| if (!isActionEnabled("memberInfo")) { | |
| if (!isActionEnabled("memberInfo", false)) { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/tools/telegram-actions.ts
Line: 325:325
Comment:
Default value mismatch: `isActionEnabled("memberInfo")` defaults to `true` (enabled), but the corresponding `gate("memberInfo", false)` in `telegram.ts:63` defaults to `false` (disabled). This means the action won't appear in `listActions` unless explicitly enabled, but the handler gate will pass even when unconfigured. Should match the `sticker` pattern and pass `false`:
```suggestion
if (!isActionEnabled("memberInfo", false)) {
```
How can I resolve this? If you propose a fix, please make it concise.
centminmod
added a commit
to centminmod/clawdbot
that referenced
this pull request
Feb 11, 2026
bfc1ccb to
f92900f
Compare
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.
Summary
Add support for
member-infoaction in Telegram plugin to retrieve chat administrators.Changes
getChatMembersTelegram()function insrc/telegram/send.tsusing Telegram Bot APIgetChatAdministratorsmemberInfoaction handler insrc/agents/tools/telegram-actions.tsmember-infoaction insrc/channels/plugins/actions/telegram.tsmemberInfooption toTelegramActionConfigtype insrc/config/types.telegram.tsUsage
Enable in config:
Call via message tool:
Returns
{ "ok": true, "chatId": "-1003707749614", "members": [ { "id": 123456789, "username": "admin_user", "firstName": "Admin", "lastName": "User", "isBot": false, "status": "administrator" } ] }Notes
getChatAdministrators(admins with elevated privileges), not a full member listTesting
Greptile Overview
Greptile Summary
Adds a
member-infoaction to the Telegram plugin that callsgetChatAdministratorsvia the Telegram Bot API and returns a list of admin members. The implementation follows the existing action pattern (config gate, action handler, send function) across four files.handleTelegramAction(isActionEnabled("memberInfo")→ defaults totrue) is inconsistent withlistActions(gate("memberInfo", false)→ defaults tofalse). Should passfalseto match thestickerpattern and ensure the action is opt-in.getChatMembersTelegramfunction insend.tscorrectly reuses the existing retry/error-logging infrastructure.Confidence Score: 3/5
src/agents/tools/telegram-actions.ts— action gate default mismatch(2/5) Greptile learns from your feedback when you react with thumbs up/down!