Skip to content

Releases: gazmull/discord-paginationembed

2.1.0

22 Jul 04:29
3624475
Compare
Choose a tag to compare

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' },
      ]);

v2.0.0

26 May 19:57
7255fe7
Compare
Choose a tag to compare

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

14 Feb 10:09
03e1f07
Compare
Choose a tag to compare
2.0.0-beta.4 Pre-release
Pre-release

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

20 Jan 19:31
9db8df8
Compare
Choose a tag to compare
2.0.0-beta.3 Pre-release
Pre-release

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

11 Nov 18:34
672b2d5
Compare
Choose a tag to compare
2.0.0-beta.2 Pre-release
Pre-release

Fixed

  • Embeds mode's _loadList overwriting existing message content

2.0.0-beta.1

09 Nov 09:30
08eca18
Compare
Choose a tag to compare
2.0.0-beta.1 Pre-release
Pre-release

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

11 Nov 18:27
da10670
Compare
Choose a tag to compare

Ports changes from 2.0.0-beta.1

1.0.2

21 Aug 10:51
e7b70c6
Compare
Choose a tag to compare

Fixed

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

2.0.0-beta.0

29 Jul 12:33
6689b5d
Compare
Choose a tag to compare
2.0.0-beta.0 Pre-release
Pre-release

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

1.0.0

29 Jul 12:33
edf8d26
Compare
Choose a tag to compare

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