-
Notifications
You must be signed in to change notification settings - Fork 40
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
[Feature Request] Add emotes / roles without exceeding 1024 character limit #21
Comments
const embeds = new Array()
const charactersPerMessage = 2000;
// we're going to go with 2000 instead of 2048 for breathing room
const emojis2 = message.guild.emojis.cache.map(e => { return `${e} = \`:${e.name}:\`\n\n` }).join('');
const numberOfMessages = Math.ceil(emojis2.length / charactersPerMessage); // calculate how many messages we need
for (i = 0; i < numberOfMessages; i++) {
embeds.push(embed.setDescription(`${emojis2.slice(i * charactersPerMessage, (i + 1) * charactersPerMessage)}`))
}` Could this be what you're trying to do? |
@Yohanfrm3 At the time this issue was created I believe the Discord character limit per message was |
will do, and yes you are right it used to be 1024, its now been raised to 2024 |
Message should display first x roles / emotes without exceeding the 1024 character limit whilst keeping track of all the characters in the roles / emotes / description among any other characters in the message.
For reference old emote display code.
The text was updated successfully, but these errors were encountered: