Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a string length property to embeds builders #8647

Closed
robotzurg opened this issue Sep 20, 2022 · 1 comment · Fixed by #8682
Closed

Adding a string length property to embeds builders #8647

robotzurg opened this issue Sep 20, 2022 · 1 comment · Fixed by #8682

Comments

@robotzurg
Copy link

Which package is the feature request for?

discord.js

Feature

In v13 you used to be able to use .length to get the total text length of all the text in an embed (author, title, description, fields, etc.) but in v14 this was not added to the EmbedBuilder, and thus there doesn't appear to be a way to get this information now without doing it manually. From what I've heard it seems to be still returned from the API, so it doesn't seem like it'd be too hard to add back in.

Ideal solution or implementation

When using .length on an EmbedBuilder, it should return the total text length of the entire embed from the API.

Alternative solutions or implementations

No response

Other context

No response

@imranbarbhuiya
Copy link
Contributor

You can do it using https://discord.js.org/#/docs/builders/main/function/embedLength

@kodiakhq kodiakhq bot closed this as completed in #8682 Jul 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants