Extended Serverinfo command is now too large for single embed #6636

Closed
opened 2025-11-26 03:27:00 +01:00 by EternalllZM · 2 comments
EternalllZM commented 2025-11-26 03:27:00 +01:00 (Migrated from github.com)

What Red version are you using?

3.5.22

Cog name

General

Command name

serverinfo 1

What did you expect to happen?

[p]serverinfo 1 should populate an embed with extended server information.

What actually happened?

[p]serverinfo 1 can now produce an error due to the message in a field being too long to produce the embed.

I assume this depends on how much is enabled within a specific server. One with a lot of experiments, subs enabled, etc. are more likely to experience this.

Error in command 'serverinfo'.

Traceback (most recent call last):
  File "/home/red/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 266, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/red/redenv/lib/python3.11/site-packages/redbot/cogs/general/general.py", line 468, in serverinfo
    await ctx.send(embed=data)
  File "/home/red/redenv/lib/python3.11/site-packages/redbot/core/commands/context.py", line 91, in send
    return await super().send(content=content, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/red/redenv/lib/python3.11/site-packages/discord/ext/commands/context.py", line 1102, in send
    return await super().send(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/red/redenv/lib/python3.11/site-packages/discord/abc.py", line 1703, in send
    data = await state.http.send_message(channel.id, params=params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/red/redenv/lib/python3.11/site-packages/discord/http.py", line 773, in request
    raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.fields.4.value: Must be 1024 or fewer in length.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/red/redenv/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1376, in invoke
    await ctx.command.invoke(ctx)
  File "/home/red/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1064, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/red/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 275, in wrapped
    raise CommandInvokeError(exc) from exc

How can we reproduce this error?

  1. Join a server with tons of features enabled (happy to invite)
  2. Run [p]serverinfo 1
  3. Error in command 'serverinfo'.
  4. Tracelog provided to admins showing that the message size in embed is too large.

Anything else?

No response

### What Red version are you using? 3.5.22 ### Cog name General ### Command name serverinfo 1 ### What did you expect to happen? `[p]serverinfo 1` should populate an embed with extended server information. ### What actually happened? `[p]serverinfo 1` can now produce an error due to the message in a field being too long to produce the embed. I assume this depends on how much is enabled within a specific server. One with a lot of experiments, subs enabled, etc. are more likely to experience this. `Error in command 'serverinfo'.` ```py Traceback (most recent call last): File "/home/red/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 266, in wrapped ret = await coro(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/red/redenv/lib/python3.11/site-packages/redbot/cogs/general/general.py", line 468, in serverinfo await ctx.send(embed=data) File "/home/red/redenv/lib/python3.11/site-packages/redbot/core/commands/context.py", line 91, in send return await super().send(content=content, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/red/redenv/lib/python3.11/site-packages/discord/ext/commands/context.py", line 1102, in send return await super().send( ^^^^^^^^^^^^^^^^^^^ File "/home/red/redenv/lib/python3.11/site-packages/discord/abc.py", line 1703, in send data = await state.http.send_message(channel.id, params=params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/red/redenv/lib/python3.11/site-packages/discord/http.py", line 773, in request raise HTTPException(response, data) discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In embeds.0.fields.4.value: Must be 1024 or fewer in length. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/red/redenv/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1376, in invoke await ctx.command.invoke(ctx) File "/home/red/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1064, in invoke await injected(*ctx.args, **ctx.kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/red/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 275, in wrapped raise CommandInvokeError(exc) from exc ``` ### How can we reproduce this error? 1. Join a server with tons of features enabled (happy to invite) 2. Run `[p]serverinfo 1` 3. `Error in command 'serverinfo'.` 4. Tracelog provided to admins showing that the message size in embed is too large. ### Anything else? _No response_
ViroAI commented 2026-01-21 21:57:30 +01:00 (Migrated from github.com)

Hi! The Discord embed character limit can be tricky with large servers. I can help you refactor the serverinfo command to use pagination or split embeds so no information is lost. It’s a straightforward fix that I can deliver quickly through my Fiverr gig. You can reach out to me here: https://www.fiverr.com/s/1qZlNze. Looking forward to helping you out!

Hi! The Discord embed character limit can be tricky with large servers. I can help you refactor the serverinfo command to use pagination or split embeds so no information is lost. It’s a straightforward fix that I can deliver quickly through my Fiverr gig. You can reach out to me here: https://www.fiverr.com/s/1qZlNze. Looking forward to helping you out!
Jackenmen commented 2026-03-04 23:33:07 +01:00 (Migrated from github.com)

Fixed by #6652

Fixed by #6652
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#6636
No description provided.