WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@MattyTheHacker
Copy link
Member

Needs some work still, but should fix the problem for the all-actions message atleast

@MattyTheHacker MattyTheHacker self-assigned this Nov 22, 2025
@MattyTheHacker MattyTheHacker added the bug Something isn't working label Nov 22, 2025
@MattyTheHacker MattyTheHacker linked an issue Nov 22, 2025 that may be closed by this pull request
@MattyTheHacker MattyTheHacker changed the title Fix message max length error Implement checks for message length before sending Nov 22, 2025
@codecov
Copy link

codecov bot commented Nov 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@MattyTheHacker MattyTheHacker added the sync Request bots to automatically keep this PR up to date with it's base branch label Nov 27, 2025
@MattyTheHacker
Copy link
Member Author

I think this is actually the only instance of this being a problem so should be fine for review now @CarrotManMatt

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements message length validation before sending Discord messages to prevent errors when message content exceeds Discord's 2000-character limit. The implementation adds chunking logic to split long messages into multiple smaller messages for the list_user_actions and list_all_actions commands in the committee actions tracking cog.

Key changes:

  • Added textwrap import for text wrapping functionality
  • Implemented message length checks (>= 2000 characters) with chunking logic for list_user_actions command
  • Implemented message length checks with two-level chunking strategy for list_all_actions command (split by sections, then wrap if sections are too long)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MattyTheHacker MattyTheHacker merged commit d013e60 into main Dec 30, 2025
12 checks passed
@MattyTheHacker MattyTheHacker deleted the message-length-checks branch December 30, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working sync Request bots to automatically keep this PR up to date with it's base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

400 Bad Request error when message too long

3 participants