![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
discord-msg-pagination
Advanced tools
A pagination utility for Messages in discord.js using message components
Discord Message Pagination is an addon for Discord.js. It helps you to create paginated messages using slash commands and message components (Buttons) if your content is too long for one message.
Node.js v16.6.0 or newer is required.
npm install discord-msg-pagination
import { sendPaginatedEmbed } from 'discord-msg-pagination';
sendPaginatedEmbed(interaction, embeds);
onPageChange
will be called whenever a button interaction happens.
import { sendPaginatedEmbed } from 'discord-msg-pagination';
function onPageChange(pageNumber, embed) {
return embed
.setTitle(`This is page #${pageNumber}`);
}
sendPaginatedEmbed(interaction, initialEmbed, { onPageChange });
interface Options {
/**
* Text to be displayed on next button
*/
nextLabel?: string,
/**
* Text to be displayed on previous button
*/
previousLabel?: string,
/**
* How long the buttons will work (defaults to 10min)
*/
time?: number,
/**
* Button style
*/
style?: ButtonStyle,
/**
* Function which will run if the page changed. Only if second argument is not an array.
*/
onPageChange?: (event: 'next' | 'previous' | string, embed: EmbedBuilder) => EmbedBuilder | Promise<EmbedBuilder>,
/**
* Message content
*/
content?: string,
/**
* Add custom components to render above the pagination buttons
*/
components?: ActionRowBuilder<any>[],
/**
* Specifiy a restriction for pagination buttons
*/
restriction?: 'ALL' | 'AUTHOR' | ((member: GuildMember) => boolean | Promise<boolean>),
/**
* Set a start index. Default index is 0
*/
startIndex?: number,
/**
* Send ephemeral response
*/
ephemeral?: boolean
}
Set your DISCORD_BOT_TOKEN
to your .env
.
cp .env.sample .env
npm run test:bot
FAQs
A pagination utility for Messages in discord.js using message components
We found that discord-msg-pagination demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.