Skip to content

Discord : clamp member-search and message-fetch limits to 1-100 - #78446

Closed
aydnOktay wants to merge 2 commits into
NousResearch:mainfrom
aydnOktay:fix/discord-tool-limit-clamp
Closed

Discord : clamp member-search and message-fetch limits to 1-100#78446
aydnOktay wants to merge 2 commits into
NousResearch:mainfrom
aydnOktay:fix/discord-tool-limit-clamp

Conversation

@aydnOktay

Copy link
Copy Markdown
Contributor

Summary

  • Clamp Discord tool search_members and fetch_messages limit to 1–100 before calling REST. Discord requires this range; upper-only min() still forwarded 0/negatives and got HTTP 400.
  • Defensive Telegram bare-adapter getattr for _polling_conflict_recovery_generation.

aydnOktay and others added 2 commits August 4, 2026 14:31
Discord's REST API requires limit in [1, 100]. Upper-only min() still forwarded 0/negatives, which fail with HTTP 400. Clamp both search_members and fetch_messages before the request.

Co-authored-by: Cursor <cursoragent@cursor.com>
…adapters

Defensively read _polling_conflict_recovery_generation via getattr so bare/__new__ adapters cannot AttributeError during progress recording.

Co-authored-by: Cursor <cursoragent@cursor.com>
@alt-glitch alt-glitch added type/bug Something isn't working comp/tools Tool registry, model_tools, toolsets platform/discord Discord bot adapter comp/plugins Plugin system and bundled plugins platform/telegram Telegram bot adapter P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Aug 4, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #19749 for the Discord limit clamp: both use the same 1-to-100 clamp in _search_members and _fetch_messages. This PR additionally bundles an unrelated Telegram adapter change.

@aydnOktay

Copy link
Copy Markdown
Contributor Author

Closing to concentrate review on a single linked product bug: #89979.

@aydnOktay aydnOktay closed this Aug 19, 2026
@aydnOktay

Copy link
Copy Markdown
Contributor Author

Closing to concentrate review on a single linked product bug: #89979.

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

Labels

comp/plugins Plugin system and bundled plugins comp/tools Tool registry, model_tools, toolsets duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have platform/discord Discord bot adapter platform/telegram Telegram bot adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants