From fa1fc679de5eae9418595a9a8c069306b2ddf5dd Mon Sep 17 00:00:00 2001 From: hirzidevs Date: Fri, 13 Sep 2024 19:41:11 +0700 Subject: [PATCH] fix: resolve issue where message buttons don't display --- handlers/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handlers/app.js b/handlers/app.js index 4d7310f..d0a94bd 100644 --- a/handlers/app.js +++ b/handlers/app.js @@ -175,10 +175,10 @@ module.exports = function App() { if (config.button.enable) { for (const row of ["row1", "row2", "row3", "row4", "row5"]) { - if (config.button[row] && config.button[row].length > 0 && config.button[row].label && config.button[row].url) - components.push( + if (config.button[row] && config.button[row].length > 0) + if (config.button[row].slice(0, 5).filter(button => button.label && button.url).length > 0) components.push( new ActionRowBuilder().addComponents( - config.button[row].slice(0, 5).map(button => + config.button[row].slice(0, 5).filter(button => button.label && button.url).map(button => new ButtonBuilder() .setLabel(button.label) .setURL(button.url)