Skip to content

Commit

Permalink
Align chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
holzmaster committed Jul 14, 2024
1 parent 546d060 commit 9694a2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/commands/gibmirids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ export default class GibMirIdsCommand implements MessageCommand {
);
lines.push(...roles.map(r => `- ${r.name}: \`${r.id}\``));

for (const chunk of chunking.splitInChunks(lines, {})) {
await message.author.send(chunk);
}
const chunks = chunking.splitInChunks(lines, {
chunkOpeningLine: "```css",
chunkClosingLine: "```",
});

await Promise.all(chunks.map(chunk => message.author.send(chunk)));
await message.react("⚙️");
}
}
1 change: 0 additions & 1 deletion src/commands/hilfe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default class HilfeCommand implements MessageCommand {
}

const chunks = chunking.splitInChunks(lines, {
charLimitPerChunk: 2000,
chunkOpeningLine: "```css",
chunkClosingLine: "```",
});
Expand Down

0 comments on commit 9694a2f

Please sign in to comment.