Discord Paginationembed Versions Save

A pagination utility for MessageEmbed in Discord.JS

2.1.0

3 years ago

Added

  • Embeds mode:
    • Added toJSON method.
    • setArray method now accepts an array of embed data (plain object):
      <PaginationEmbed>.setArray([
          { title: 'Yes', description: 'No' },
          { title: 'No', description: 'Yes' },
      ]);
      

2.0.0

3 years ago

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.

Added

  • (ft. @cycloptux) - setPageIndicator is now powerful for customisation.
    • First parameter has additional option footer (makes the indicator replace the embed's footer text instead).
      • footer option will not directly modify embeds from array when using Embeds mode.
    • Second parameter has been added for indicator's formatting function: either use the following pre-made formats 'text' | 'textcompact' | 'circle' | 'hybrid' — or make your own format.
    • In case you don't like the placing of the indicator (i.e. you want it in embed title instead), you can set the first parameter as false but set the second parameter to your preferred format and later on use the format by accessing getter pageIndicator then modify the embed via pageUpdate event.
    • Example
      • <PaginationEmbed>.setPageIndicator('footer', (page, pages) => `peij ${page} 0f ${pages} - xoxo`)
        
      • Pre-made formats preview:
        • (default) text: Page 1 of 2
        • textcompact: 1/2
        • circle: ● ○
        • hybrid: [1/2] ● ○
  • setAuthorizedUsers now accepts a user ID as well instead of just an array of user IDs.

Changed

  • ⚠ BREAKING - Embeds mode's changes to reflect Discord.JS' MessageEmbed methods:
    • Removed addBlankField
    • spliceField renamed to spliceFields
    • Added addFields
  • ⚠ BREAKING - Removed I prefix on the following TypeScript interfaces: INavigationEmojis, IClientAssets, IFunctionEmoji
  • ⚠ BREAKING - Renamed property pageIndicator to usePageIndicator
  • ⚠ BREAKING - Navigation emoji identifiers (BACK, JUMP, FORWARD, DELETE, ALL) has been lowercased due to unnecessary internal transformations.
  • usePageIndicator's default is now set to false.
  • Event pageUpdate has been relocated to emit at initial page as well.
  • Events' JSDoc description has been improved.
  • (@cycloptux) - Peer dependency Discord.JS version updated to ^12.0.0
  • README's example has been updated to reduce complexity.

Fixed

  • (@d-shaun) - Undesirable placement of start event's emission

Internal

  • (ft. @cycloptux) - Test script bot.js updated for new changes
  • Migrated linter from TSLint to ESLint
  • Upload vscode settings

2.0.0-beta.4

4 years ago

Utility 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.

2.0.0-beta.3

4 years ago

Added

  • attachFiles method for Embeds mode
  • pageUpdate event (emitted when the page number is updated via reaction)
  • Verbose documentation to navigationEmojis and functionEmojis

Changed

  • Test script bot.js updated for new features

Fixed

  • Incorrect documentation examples for FieldsEmbed mode
  • Fix Unknown Message error when deleteOnTimeout is enabled

2.0.0-beta.2

4 years ago

Fixed

  • Embeds mode's _loadList overwriting existing message content

1.0.3

4 years ago

Ports changes from 2.0.0-beta.1

2.0.0-beta.1

4 years ago

Added

  • Documentation example for IFunctionEmoji: stopping the instance from awaiting reacts with function emojis

Changed

  • Documentation changes involving page and pages properties

Fixed

  • Incorrect installation note on UPDATING_V1.md
  • FieldsEmbed mode's _loadList overwriting existing message content

1.0.2

4 years ago

Fixed

Message content containing null when there's only one page / indicator set to disabled (issues/4#issuecomment-523163586)

2.0.0-beta.0

4 years ago

Nothing new, but incremented version to make way for updated Discord.JS v11 variant release.

1.0.0

4 years ago

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