From 8978f6e0cd20ee18f27cad8296858288ba3d1b2b Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 27 May 2022 22:17:58 -0400 Subject: fix(BushClientUtil#overflowEmbed): correctly overflow --- src/lib/extensions/discord-akairo/BushClientUtil.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index aea515a..7629c38 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -984,8 +984,11 @@ export class BushClientUtil extends ClientUtil { for (const line of lines) { let current = embeds.length ? embeds.at(-1)! : makeEmbed(); - const joined = current.data.description ? `${current.data.description}\n${line}` : line; - if (joined.length >= maxLength) current = makeEmbed(); + let joined = current.data.description ? `${current.data.description}\n${line}` : line; + if (joined.length > maxLength) { + current = makeEmbed(); + joined = line; + } current.setDescription(joined); } -- cgit