ReplyUtils: Make component recreation compatible with multi-row components
This commit is contained in:
@@ -4,6 +4,7 @@ module.exports = {
|
||||
name: "ReplyUtils",
|
||||
recreateComponents: function(components) {
|
||||
console.log("Recreating components");
|
||||
let newComponents = [];
|
||||
for (let i = 0; i < components.length; i++) {
|
||||
let row = new ActionRowBuilder();
|
||||
for (let j = 0; j < components[i].components.length; j++) {
|
||||
@@ -21,7 +22,8 @@ module.exports = {
|
||||
}
|
||||
row.addComponents(button);
|
||||
}
|
||||
return row;
|
||||
newComponents.push(row);
|
||||
}
|
||||
return newComponents;
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user