@novelbrasil/discord.js-embed-menu
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -170,3 +170,2 @@ "use strict"; | ||
if (this.menu && this.menu instanceof discord_js_1.Message) { | ||
console.log(this.menu); | ||
const filter = (_interaction) => { | ||
@@ -177,9 +176,8 @@ return _interaction.user.id === this.user.id; | ||
const component = yield this.menu.awaitMessageComponent({ filter, time: this.timeout, componentType: discord_js_1.ComponentType.Button }); | ||
console.log(component); | ||
if (!component) | ||
return; | ||
component.deferUpdate(); | ||
const key = Object.prototype.hasOwnProperty.call(this.currentPage.buttons, component.customId) | ||
? component.customId | ||
: Object.prototype.hasOwnProperty.call(this.currentPage.buttons, component.id) ? component.id : null; | ||
console.log(key); | ||
if (key && this.menu && this.menu instanceof discord_js_1.Message) { | ||
@@ -186,0 +184,0 @@ if (component.user.id !== this.user.id) |
{ | ||
"name": "@novelbrasil/discord.js-embed-menu", | ||
"description": "Easily create Discord.js embed menus with reactions and unlimited customisable pages.", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"author": "eilex", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -196,3 +196,2 @@ import { EventEmitter } from 'events'; | ||
if (this.menu && this.menu instanceof Message) { | ||
console.log(this.menu) | ||
const filter = (_interaction: any): boolean => { | ||
@@ -203,4 +202,4 @@ return _interaction.user.id === this.user.id | ||
const component = await this.menu.awaitMessageComponent({ filter, time: this.timeout, componentType: ComponentType.Button }) | ||
console.log(component) | ||
if (!component) return | ||
component.deferUpdate() | ||
@@ -210,3 +209,2 @@ const key = Object.prototype.hasOwnProperty.call(this.currentPage.buttons, component.customId as string) | ||
: Object.prototype.hasOwnProperty.call(this.currentPage.buttons, component.id as string) ? component.id : null; | ||
console.log(key) | ||
if (key && this.menu && this.menu instanceof Message) { | ||
@@ -213,0 +211,0 @@ if (component.user.id !== this.user.id) return |
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
474959
3994