fix: split array to 5 if buttons

This commit is contained in:
Jozef Steinhübl 2023-05-27 19:30:37 +02:00 committed by GitHub
parent f100b39a7a
commit 38166658f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,7 @@ export default async function (ctx: Context, data: Data) {
}
const components: APIActionRowComponent<APIMessageActionRowComponent>[] = [];
const array = splitArray(data.roleIds, 25);
const array = splitArray(data.roleIds, data.selecting === "buttons" ? 5 : 25);
for (const items of array) {
const actionRow = new ActionRowBuilder();