A pagination utility for MessageEmbed in Discord.JS
This version involves reflection of official release of Discord.JS 12, code optimisations, and changes that will give the user more control to the instance such as customisable page indicator, and favourable event emissions.
setPageIndicator
is now powerful for customisation.
footer
(makes the indicator replace the embed's footer text instead).
footer
option will not directly modify embeds from array
when using Embeds
mode.'text' | 'textcompact' | 'circle' | 'hybrid'
— or make your own format.pageIndicator
then modify the embed via pageUpdate
event.<PaginationEmbed>.setPageIndicator('footer', (page, pages) => `peij ${page} 0f ${pages} - xoxo`)
Page 1 of 2
1/2
● ○
[1/2] ● ○
setAuthorizedUsers
now accepts a user ID as well instead of just an array of user IDs.Embeds
mode's changes to reflect Discord.JS' MessageEmbed methods:
addBlankField
spliceField
renamed to spliceFields
addFields
I
prefix on the following TypeScript interfaces: INavigationEmojis
, IClientAssets
, IFunctionEmoji
pageIndicator
to usePageIndicator
BACK
, JUMP
, FORWARD
, DELETE
, ALL
) has been lowercased due to unnecessary internal transformations.usePageIndicator
's default is now set to false.pageUpdate
has been relocated to emit at initial page as well.^12.0.0
start
event's emissionbot.js
updated for new changesUtility has been updated to support the breaking change feature Managers
. Starting from this version it will no longer support the Discord.JS master commits earlier than bbdbc4c
.
attachFiles
method for Embeds modepageUpdate
event (emitted when the page number is updated via reaction)navigationEmojis
and functionEmojis
bot.js
updated for new featuresUnknown Message
error when deleteOnTimeout
is enabledPorts changes from 2.0.0-beta.1
Message content containing null
when there's only one page / indicator set to disabled (issues/4#issuecomment-523163586)
Nothing new, but incremented version to make way for updated Discord.JS v11 variant release.
Latest release for v11 branch. See changes below from 1.0.0-beta.0.
Master branch (For Discord.JS v12) has been incremented to 2.0.0-beta.0