several small adjustments smiley

This commit is contained in:
bignutty 2024-08-08 23:11:40 +02:00
parent f280311212
commit cd624c9066
4 changed files with 47 additions and 37 deletions

View file

@ -1,3 +1,4 @@
const { COMPONENT_BUTTON_ICONS } = require("#constants");
const { icon } = require("#utils/markdown");
const InteractionPaginator = require("./InteractionPaginator");
const assert = require("assert");
@ -10,14 +11,6 @@ const allowedEvents = new Set([
"MESSAGE_CREATE"
]);
const ButtonEmoji = Object.freeze({
NEXT: icon("button_chevron_right"),
PREVIOUS: icon("button_chevron_left"),
STOP: '<:ico_trash:929498022386221096>',
SEARCH: '<:search:1063080546365866056>',
UNKNOWN: '<:ico_question:949420315677691934>'
})
const { hasOwnProperty } = Object.prototype;
const instances = new WeakSet();
@ -126,14 +119,14 @@ module.exports = class Paginator {
customId: "custom",
disabled: 0,
style: 2,
emoji: ButtonEmoji.UNKNOWN
emoji: COMPONENT_BUTTON_ICONS.UNKNOWN
}, b));
} else {
components.createButton({
customId: b,
disabled: 0,
style: 2,
emoji: ButtonEmoji[b.toUpperCase()]
emoji: COMPONENT_BUTTON_ICONS[b.toUpperCase()]
});
}
}