Embed limits
I've looked all over the place on the internet but there is nothing on how to get the max character limit number for an embed description, embed field text, embed footer, etc.
Why do I find this bothersome? Basically, because you would have to go to discord.js guide, manually look up the limits for each individual embed part (as mentioned earlier: description, author name,...) and manually change that in your code in case you plan to post a long text full of information and need to do so in multiple messages without getting an error like "you exceeded the max amount of characters" or something.
Resulting from this, say Discord API changes each limit back to their original state (half of what we've seen now, as in what was shown 1-3 years ago). That would mean we would get errors thinking the embed limitations are still the same until we look up in the guide and see the new changes. Even though they don't change it much, we never know until it's done or it's mentioned.
So what I suggest is that there should be a method to get the max number of characters allowed in an individual embed part. Example: I want to get the max amount of an embed description so in the code I do "embed.description.maxLength" or "embed.description.limit" (whichever sound preferable) and it's give out "4096" as the answer. Or this time I want the max value for a field text so I do "embed.field.value.maxLength" or "embed.field.value.limit" (again whichever seems preferable) and as answer it'll give out 1024.
This way, even if the limitations get increased or decreased, we'll always be able to know what they are. Whether they get changed often or not.
-
It is quite literally in the docs
https://discord.com/developers/docs/resources/channel#embed-limitsThese have never gone down, and frankly I don't think they've gone up either.
Discord also does not maintain any libraries, if you're suggesting a feature for discord.js, go talk to their team.
0 -
Last time I check, embed description limit was 2048 characters a long while ago.
Also I've already mentioned that you have to manually check the guides to know the limits since there's no methods to automatically get the limit number.
And I have already have talked to their team hours ago, I was told to post the suggestion here.-1 -
Whoever you talked to was either not part of their team, or was incompetent, because this is NOT the place for library suggestions. As I already said, Discord has nothing to do with those libraries.
1
Please sign in to leave a comment.
Comments
3 comments