acegoal07 / discordjs-pagination

A pagination package for Discord.js
https://acegoal07.dev
MIT License
6 stars 3 forks source link

[BUG] Error occured with InteractionPagination TypeError [INVALID_TYPE]: Supplied data.type is not a valid MessageComponentType. #10

Closed GlxryX closed 2 years ago

GlxryX commented 2 years ago

Describe the bug Pagination unable to send

Error message Error occured with InteractionPagination TypeError [INVALID_TYPE]: Supplied data.type is not a valid MessageComponentType.

Sample of the code where it is used

new paginationWrapper()
  .setInteraction(interaction)
  .setPageList(pageList)
  .setButtonList([
    new Discord.ButtonBuilder()
      .setCustomId('firstbtn')
      .setEmoji({ id: '959992408433627137' })
      .setStyle('Secondary'),
    new Discord.ButtonBuilder()
      .setCustomId('previousbtn')
      .setEmoji({ id: '924719153288458271' })
      .setStyle('Secondary'),
    new Discord.ButtonBuilder()
      .setCustomId('nextbtn')
      .setEmoji({ id: '924719286918987816' })
      .setStyle('Secondary'),
    new Discord.ButtonBuilder()
      .setCustomId('lastbtn')
      .setEmoji({ id: '959992408651755520' })
      .setStyle('Secondary'),
  ])
  .paginate()

Additional info

acegoal07 commented 2 years ago

This error is being caused by recent changes in discord.js v14 I'm working on updating the package

acegoal07 commented 2 years ago

I am just adding the finishing touches to version 1.3.1 which will add support for discord.js version 14