@novelbrasil/discord.js-embed-menu
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -129,8 +129,11 @@ "use strict"; | ||
if (this.currentPage.buttons) { | ||
const buttons = this.currentPage.buttons; | ||
console.log(this.currentPage.buttons); | ||
for (let i = 1; i <= Object.keys(this.currentPage.buttons).length; i++) | ||
console.log(Object.keys(buttons)); | ||
console.log(Object.keys(buttons).length); | ||
for (let i = 1; i <= Object.keys(buttons).length; i++) | ||
if (i % 5 == 0) | ||
components.push(new discord_js_1.ActionRowBuilder()); | ||
for (const row of components) { | ||
for (const button of Object.values(this.currentPage.buttons)) { | ||
for (const button of Object.values(buttons)) { | ||
row.addComponents(button.button); | ||
@@ -137,0 +140,0 @@ } |
{ | ||
"name": "@novelbrasil/discord.js-embed-menu", | ||
"description": "Easily create Discord.js embed menus with reactions and unlimited customisable pages.", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"author": "eilex", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -154,8 +154,11 @@ import { EventEmitter } from 'events'; | ||
if (this.currentPage.buttons) { | ||
const buttons = this.currentPage.buttons as Record<string, ButtonType> | ||
console.log(this.currentPage.buttons) | ||
for (let i = 1; i <= Object.keys(this.currentPage.buttons as Record<string, ButtonType>).length; i++) | ||
console.log(Object.keys(buttons)) | ||
console.log(Object.keys(buttons).length) | ||
for (let i = 1; i <= Object.keys(buttons).length; i++) | ||
if (i % 5 == 0) | ||
components.push(new ActionRowBuilder<ButtonBuilder>()) | ||
for (const row of components) { | ||
for (const button of Object.values(this.currentPage.buttons as Record<string, ButtonType>)) { | ||
for (const button of Object.values(buttons)) { | ||
row.addComponents(button.button) | ||
@@ -162,0 +165,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
475343
3995