Skip to content

Commit 2e44a45

Browse files
committed
fix: allow a lot of emojis
1 parent e0f28b0 commit 2e44a45

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/src/api/builders/embed/embed_builder.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,13 @@ class EmbedBuilder {
251251
embed.addField(name: 'Features', value: preview.features.map((feature) => '• $feature').join('\n'), inline: true);
252252

253253
if (preview.stickers.isNotEmpty || preview.emojis.isNotEmpty) {
254-
embed.addField(name: 'Emojis', value: preview.emojis.values.map((emoji) => emoji).join(' '), inline: true);
254+
List<Emoji> emojis = preview.emojis.values.toList();
255+
256+
if(emojis.length > 25) {
257+
emojis = emojis.sublist(0, 25);
258+
}
259+
260+
embed.addField(name: 'Emojis', value: emojis.map((emoji) => emoji).join(' ') + "...", inline: true);
255261
}
256262

257263
embed.addField(name: '\u200B', value: '\u200B');

0 commit comments

Comments
 (0)