{"id":18643363,"url":"https://github.com/ryzyx/discordjs-button-pagination","last_synced_at":"2025-08-20T22:31:59.431Z","repository":{"id":39906867,"uuid":"379932864","full_name":"ryzyx/discordjs-button-pagination","owner":"ryzyx","description":"A simple package for pagination using buttons introduced in discord.js v13.","archived":false,"fork":false,"pushed_at":"2023-07-18T03:57:35.000Z","size":93,"stargazers_count":50,"open_issues_count":10,"forks_count":32,"subscribers_count":2,"default_branch":"interaction","last_synced_at":"2025-08-10T08:17:00.958Z","etag":null,"topics":["buttons","discord","discord-js","paginator"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/discordjs-button-pagination","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryzyx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-24T13:24:20.000Z","updated_at":"2025-07-31T14:28:07.000Z","dependencies_parsed_at":"2024-06-19T10:00:53.026Z","dependency_job_id":"0c17780d-9ade-48da-bac3-2d3b201c1ae0","html_url":"https://github.com/ryzyx/discordjs-button-pagination","commit_stats":{"total_commits":55,"total_committers":9,"mean_commits":6.111111111111111,"dds":0.509090909090909,"last_synced_commit":"4f6831cc79d7edd2e48d4035867e07951e0ab261"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ryzyx/discordjs-button-pagination","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzyx%2Fdiscordjs-button-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzyx%2Fdiscordjs-button-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzyx%2Fdiscordjs-button-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzyx%2Fdiscordjs-button-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryzyx","download_url":"https://codeload.github.com/ryzyx/discordjs-button-pagination/tar.gz/refs/heads/interaction","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzyx%2Fdiscordjs-button-pagination/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271397957,"owners_count":24752640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buttons","discord","discord-js","paginator"],"created_at":"2024-11-07T06:06:35.364Z","updated_at":"2025-08-20T22:31:59.147Z","avatar_url":"https://github.com/ryzyx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![discordjs-pagination](https://user-images.githubusercontent.com/57099786/126899921-eb1e0728-ab64-4d28-a59c-835662957a8a.png)](https://npmjs.com/package/discordjs-button-pagination)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://npmjs.com/package/discordjs-button-pagination\n/\"\u003e\u003cimg src=\"https://nodei.co/npm/discordjs-button-pagination.png?downloads=true\u0026stars=true\" alt=\"NPM info\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n# discordjs-button-pagination\nA simple package to paginate discord embeds via discord buttons introduced in [discord.js v13](https://github.com/discordjs/discord.js/tree/master).\n\n# Versions\n\n## `discordjs-button-pagination@interaction` [Default]\nfor slash command interaction.\n\n## `discordjs-button-pagination@msg`\nfor message command.\n# Installation\nFor `message` event\n* `npm install discordjs-button-pagination@msg`\n\nFor `interaction` event\n* `npm install discordjs-button-pagination@interaction`\n\n## Default command: `npm install discordjs-button-pagination` will install the **`interaction`** version\n\n# Requirements\nNode.js 16.6.1 or newer is required along with Discord.js 13.0.0 or newer.\n\n\n# Usage for Interaction (Slash Command)\n__Basic Bot Example__\n```js\n// Import the discordjs-button-pagination package\nconst paginationEmbed = require('discordjs-button-pagination');\n\n// Use MessageEmbed to make pages\n// Keep in mind that Embeds should't have their footers set since the pagination method sets page info there\nconst { MessageEmbed , MessageButton} = require('discord.js');\nconst embed1 = new MessageEmbed()\n                .setTitle('First Page')\n                .setDescription('This is the first page');\n\nconst embed2 = new MessageEmbed()\n                .setTitle('Second Page')\n                .setDescription('This is the second page');\n\nconst button1 = new MessageButton()\n                .setCustomId('previousbtn')\n                .setLabel('Previous')\n                .setStyle('DANGER');\n\nconst button2 = new MessageButton()\n                .setCustomId('nextbtn')\n                .setLabel('Next')\n                .setStyle('SUCCESS');\n\n// Create an array of embeds\npages = [\n\tembed1,\n\tembed2,\n\t//....\n\t//embedN\n];\n\n//create an array of buttons\n\nbuttonList = [\n    button1,\n    button2\n]\n\n\n// Call the paginationEmbed method, first three arguments are required\n// timeout is the time till the reaction collectors are active, after this you can't change pages (in ms), defaults to 120000\npaginationEmbed(interaction, pages, buttonList, timeout);\n// There you go, now you have paged embeds\n```\n\n# Note\nThis will not work with buttons whose style is set as 'LINK' as they do not trigger an interaction event. The buttons will auto disable once the the collector ends after the timeout.\n## The collector timer resets after receiving a button interaction.\n\n# Preview\n\nFirst Page\n\n![pic1](https://user-images.githubusercontent.com/57099786/126900536-0daa030b-eaae-4a00-ad1c-912a2a5ca6af.PNG)\n\n\n\nSecond Page\n\n![pic2](https://user-images.githubusercontent.com/57099786/126900544-96fd0163-26f8-44b4-b823-f84756ae0028.PNG)\n\n\n\nDisabled Buttons after collector end\n\n![pic3](https://user-images.githubusercontent.com/57099786/126900553-b9ab9cb7-1dfd-45ae-9e31-469b249f0c18.PNG)\n\n\n\n### For any issues or suggestions, kindly open an issue/pull request on the [**GitHub Repository**](https://github.com/ryzyx/discordjs-button-pagination)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryzyx%2Fdiscordjs-button-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryzyx%2Fdiscordjs-button-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryzyx%2Fdiscordjs-button-pagination/lists"}