{"id":30806499,"url":"https://github.com/shimizudev/miyuki-pagination","last_synced_at":"2025-09-11T09:02:19.195Z","repository":{"id":313420716,"uuid":"1050920622","full_name":"shimizudev/miyuki-pagination","owner":"shimizudev","description":"🌸 A delightfully cute and professional Discord embed paginator for Discord.js v14+ with customizable buttons, themes, and adorable messages","archived":false,"fork":false,"pushed_at":"2025-09-05T06:44:24.000Z","size":38,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-05T23:58:01.371Z","etag":null,"topics":["bun","discord","discord-pagination","djs","embed-pagination","javascript","miyuki","miyuki-pagination","mpgj","nodejs","pagination","text-pagination","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/shimizudev.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-05T06:43:15.000Z","updated_at":"2025-09-05T16:59:14.000Z","dependencies_parsed_at":"2025-09-05T23:58:05.509Z","dependency_job_id":"5e019876-89d8-48d1-a325-f6c5c54ca206","html_url":"https://github.com/shimizudev/miyuki-pagination","commit_stats":null,"previous_names":["shimizudev/miyuki-pagination"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/shimizudev/miyuki-pagination","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimizudev%2Fmiyuki-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimizudev%2Fmiyuki-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimizudev%2Fmiyuki-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimizudev%2Fmiyuki-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shimizudev","download_url":"https://codeload.github.com/shimizudev/miyuki-pagination/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimizudev%2Fmiyuki-pagination/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274423865,"owners_count":25282410,"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-09-10T02:00:12.551Z","response_time":83,"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":["bun","discord","discord-pagination","djs","embed-pagination","javascript","miyuki","miyuki-pagination","mpgj","nodejs","pagination","text-pagination","typescript"],"created_at":"2025-09-06T01:04:13.306Z","updated_at":"2025-09-11T09:02:19.030Z","avatar_url":"https://github.com/shimizudev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌸 Miyuki Pagination\n\n[![npm version](https://img.shields.io/npm/v/miyuki-pagination.svg?style=flat-square)](https://www.npmjs.com/package/miyuki-pagination)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue?style=flat-square)](https://www.typescriptlang.org/)\n[![Discord.js](https://img.shields.io/badge/Discord.js-v14+-7289da?style=flat-square)](https://discord.js.org/)\n[![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)](LICENSE)\n\n\u003e A delightfully cute and professional Discord embed paginator for Discord.js v14+ ✨\n\nTransform your bot's embed displays into beautiful, interactive experiences with customizable buttons, adorable messages, and powerful features that users will love!\n\n## ✨ Features\n\n- 🎨 **Fully Customizable** - Buttons, messages, styling, and behavior\n- 🌸 **Cute Default Messages** - Adorable responses that add personality\n- 🚀 **TypeScript Ready** - Full type safety and IntelliSense support\n- 🔧 **Easy to Use** - Simple API with sensible defaults\n- 🎯 **Multiple Navigation Modes** - From minimal to advanced layouts\n- ⚡ **Performance Optimized** - Efficient collectors and memory management\n- 🔒 **Permission Control** - Author-only or public interaction modes\n- 🔄 **Loop Navigation** - Optional page wrapping for seamless browsing\n- 📊 **Page Information** - Built-in page info and jump functionality\n- 🎨 **Pre-made Themes** - Beautiful button configs ready to use\n\n## 📦 Installation\n\n```bash\nnpm install miyuki-pagination\n# or\nyarn add miyuki-pagination\n# or\npnpm add miyuki-pagination\n# or\nbun add miyuki-pagination\n```\n\n## 🚀 Quick Start\n\n```typescript\nimport { EmbedBuilder } from 'discord.js';\nimport { MiyukiPaginator } from 'miyuki-pagination';\n\n// Create your embeds\nconst embeds = [\n  new EmbedBuilder().setTitle('Page 1').setDescription('First page content! (◕‿◕)'),\n  new EmbedBuilder().setTitle('Page 2').setDescription('Second page content! ✨'),\n  new EmbedBuilder().setTitle('Page 3').setDescription('Third page content! 🌸'),\n];\n\n// Create and start the paginator\nconst paginator = new MiyukiPaginator({ embeds });\nawait paginator.start(interaction);\n```\n\nThat's it! Your users can now navigate through pages with beautiful, responsive buttons! 🎉\n\n## 📖 Basic Usage\n\n### Slash Commands\n\n```typescript\nimport { SlashCommandBuilder } from 'discord.js';\nimport { MiyukiPaginator } from 'miyuki-pagination';\n\nexport default {\n  data: new SlashCommandBuilder()\n    .setName('help')\n    .setDescription('Show help pages'),\n  \n  async execute(interaction) {\n    const helpEmbeds = createHelpEmbeds(); // Your embed creation logic\n    \n    const paginator = new MiyukiPaginator({\n      embeds: helpEmbeds,\n      timeout: 60000,\n      showPageNumbers: true,\n      authorOnly: true\n    });\n    \n    await paginator.start(interaction);\n  }\n};\n```\n\n### Regular Messages\n\n```typescript\n// For prefix commands or message-based triggers\nconst paginator = new MiyukiPaginator({ embeds: myEmbeds });\nawait paginator.startMessage(message, { content: 'Here are your results!' });\n```\n\n## 🎨 Customization Options\n\n### Button Themes\n\nUse pre-made button configurations for different styles:\n\n```typescript\nimport { ButtonConfigs, createMiyukiPaginator } from 'miyuki-pagination';\n\n// Minimal navigation (Previous, Stop, Next)\nconst minimal = createMiyukiPaginator({\n  embeds: myEmbeds,\n  buttons: ButtonConfigs.minimal()\n});\n\n// Simple navigation (Previous, Next only)\nconst simple = createMiyukiPaginator({\n  embeds: myEmbeds,\n  buttons: ButtonConfigs.simple()\n});\n\n// Advanced navigation (all features)\nconst advanced = createMiyukiPaginator({\n  embeds: myEmbeds,\n  buttons: ButtonConfigs.advanced()\n});\n\n// Cute theme with flower emojis! 🌸\nconst cute = createMiyukiPaginator({\n  embeds: myEmbeds,\n  buttons: ButtonConfigs.cute()\n});\n```\n\n### Custom Buttons\n\nCreate your own button layouts:\n\n```typescript\nimport { PaginatorButtonType, ButtonStyle } from 'miyuki-pagination';\n\nconst paginator = new MiyukiPaginator({\n  embeds: myEmbeds,\n  buttons: [\n    {\n      type: PaginatorButtonType.PREVIOUS,\n      emoji: '⬅️',\n      label: 'Back',\n      style: ButtonStyle.Primary,\n      position: 0\n    },\n    {\n      type: PaginatorButtonType.STOP,\n      emoji: '🛑',\n      label: 'Stop',\n      style: ButtonStyle.Danger,\n      position: 1\n    },\n    {\n      type: PaginatorButtonType.NEXT,\n      emoji: '➡️',\n      label: 'Forward',\n      style: ButtonStyle.Primary,\n      position: 2\n    }\n  ]\n});\n```\n\n### Custom Messages\n\nPersonalize all the messages or add internationalization:\n\n```typescript\nconst paginator = new MiyukiPaginator({\n  embeds: myEmbeds,\n  responseMessages: {\n    authorOnlyError: \"🚫 Only you can navigate this menu!\",\n    noEmbedsError: \"😅 Oops! No content to display.\",\n    pageInfoTitle: \"📋 Navigation Info\",\n    pageInfoDescription: \"Current pagination details:\",\n    jumpToPageContent: \"🎯 Jump to page {current} of {total}\"\n  }\n});\n```\n\n## 🔧 Advanced Features\n\n### Page Looping\n\nEnable seamless navigation with page wrapping:\n\n```typescript\nconst paginator = new MiyukiPaginator({\n  embeds: myEmbeds,\n  loopPages: true, // Last page -\u003e First page, First page -\u003e Last page\n  showPageNumbers: true\n});\n```\n\n### Public Interaction Mode\n\nAllow anyone to navigate (not just the command author):\n\n```typescript\nconst paginator = new MiyukiPaginator({\n  embeds: myEmbeds,\n  authorOnly: false, // Anyone can interact with buttons\n  timeout: 120000   // Longer timeout for public use\n});\n```\n\n### Page Information \u0026 Jumping\n\nAdd utility buttons for better navigation:\n\n```typescript\nconst paginator = new MiyukiPaginator({\n  embeds: myEmbeds,\n  allowJumping: true,  // Adds jump-to-page button\n  showPageInfo: true,  // Adds page info button\n  showPageNumbers: true // Shows \"Page X of Y\" in footer\n});\n```\n\n### Dynamic Message Updates\n\nUpdate messages after creating the paginator:\n\n```typescript\nconst paginator = new MiyukiPaginator({ embeds: myEmbeds });\n\n// Update a single message\npaginator.updateResponseMessage('authorOnlyError', 'Custom error message!');\n\n// Update multiple messages\npaginator.updateMultipleMessages({\n  pageInfoTitle: 'Custom Info Title',\n  pageInfoDescription: 'Custom description here!'\n});\n```\n\n## 🛠️ Utility Functions\n\n### Easy Embed Creation\n\nConvert data objects to embeds effortlessly:\n\n```typescript\nimport { createEmbedsFromContent } from 'miyuki-pagination';\n\nconst content = [\n  {\n    title: 'Server Rules',\n    description: 'Please follow these guidelines:',\n    color: 0xff69b4,\n    fields: [\n      { name: '1. Be Respectful', value: 'Treat everyone kindly', inline: false },\n      { name: '2. No Spam', value: 'Keep chat clean', inline: false }\n    ],\n    thumbnail: 'https://example.com/rules-icon.png'\n  },\n  {\n    title: 'Moderation',\n    description: 'Information about our moderation system:',\n    color: 0x00ff00,\n    fields: [\n      { name: 'Warning System', value: '3 strikes policy', inline: true },\n      { name: 'Appeal Process', value: 'DM moderators', inline: true }\n    ]\n  }\n];\n\nconst embeds = createEmbedsFromContent(content);\nconst paginator = new MiyukiPaginator({ embeds });\n```\n\n### Factory Function\n\nUse the factory function for cleaner code:\n\n```typescript\nimport { createMiyukiPaginator } from 'miyuki-pagination';\n\nconst paginator = createMiyukiPaginator({\n  embeds: myEmbeds,\n  timeout: 30000,\n  authorOnly: false,\n  loopPages: true\n});\n```\n\n## 📚 API Reference\n\n### MiyukiPaginator Constructor Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `embeds` | `EmbedBuilder[]` | **Required** | Array of embeds to paginate |\n| `timeout` | `number` | `60000` | Timeout in milliseconds |\n| `buttons` | `CustomButton[]` | `undefined` | Custom button configuration |\n| `useDefaultButtons` | `boolean` | `true` | Whether to use default buttons |\n| `buttonLabels` | `object` | `{}` | Custom labels for default buttons |\n| `buttonEmojis` | `object` | `{}` | Custom emojis for default buttons |\n| `responseMessages` | `ResponseMessages` | `{}` | Custom response messages |\n| `showPageNumbers` | `boolean` | `true` | Show \"Page X of Y\" in footer |\n| `authorOnly` | `boolean` | `true` | Only author can interact |\n| `maxButtonsPerRow` | `number` | `5` | Max buttons per row |\n| `allowJumping` | `boolean` | `false` | Enable jump-to-page feature |\n| `showPageInfo` | `boolean` | `false` | Show page info button |\n| `loopPages` | `boolean` | `false` | Enable page looping |\n\n### Button Types\n\n```typescript\nenum PaginatorButtonType {\n  FIRST = \"first\",     // Navigate to first page\n  PREVIOUS = \"previous\", // Navigate to previous page\n  NEXT = \"next\",       // Navigate to next page\n  LAST = \"last\",       // Navigate to last page\n  STOP = \"stop\",       // Close paginator\n  JUMP = \"jump\",       // Jump to specific page\n  INFO = \"info\"        // Show page information\n}\n```\n\n### Methods\n\n- `start(interaction: CommandInteraction)` - Start from slash command\n- `startMessage(message: Message, options?)` - Start from regular message\n- `updateResponseMessage(key, value)` - Update single message\n- `updateMultipleMessages(messages)` - Update multiple messages\n- `getResponseMessage(key)` - Get current message\n- `getAllResponseMessages()` - Get all current messages\n\n## 🎯 Examples\n\n### Help Command with Categories\n\n```typescript\nconst helpCategories = [\n  {\n    title: '📋 General Commands',\n    description: 'Basic bot functionality',\n    fields: [\n      { name: '/help', value: 'Show this help menu', inline: false },\n      { name: '/ping', value: 'Check bot latency', inline: false }\n    ],\n    color: 0x3498db\n  },\n  {\n    title: '🎵 Music Commands',\n    description: 'Music playback features',\n    fields: [\n      { name: '/play', value: 'Play a song', inline: false },\n      { name: '/pause', value: 'Pause current song', inline: false }\n    ],\n    color: 0xe91e63\n  }\n];\n\nconst embeds = createEmbedsFromContent(helpCategories);\nconst paginator = new MiyukiPaginator({\n  embeds,\n  buttons: ButtonConfigs.cute(),\n  timeout: 120000\n});\n\nawait paginator.start(interaction);\n```\n\n### Server Member List\n\n```typescript\nasync function createMemberPages(guild) {\n  const members = await guild.members.fetch();\n  const pages = [];\n  const membersPerPage = 10;\n  \n  for (let i = 0; i \u003c members.size; i += membersPerPage) {\n    const pageMembers = Array.from(members.values()).slice(i, i + membersPerPage);\n    \n    const embed = new EmbedBuilder()\n      .setTitle(`👥 Server Members`)\n      .setDescription(`Showing ${pageMembers.length} members`)\n      .setColor(0x00ff00);\n    \n    pageMembers.forEach(member =\u003e {\n      embed.addFields({\n        name: member.displayName,\n        value: `\u003c@${member.id}\u003e`,\n        inline: true\n      });\n    });\n    \n    pages.push(embed);\n  }\n  \n  return pages;\n}\n\n// Usage\nconst memberEmbeds = await createMemberPages(interaction.guild);\nconst paginator = new MiyukiPaginator({\n  embeds: memberEmbeds,\n  authorOnly: false,\n  showPageInfo: true,\n  allowJumping: true\n});\n\nawait paginator.start(interaction);\n```\n\n## 🤝 Contributing\n\nWe love contributions! Whether it's bug reports, feature requests, or code improvements:\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🌸 Credits\n\nMade with ❤️ and lots of kawaii energy! Special thanks to the Discord.js team for the amazing library.\n\n---\n\n**Miyuki Pagination** - Making Discord bot pagination cute and powerful since 2025! ✨\n\n*If you love this library, consider giving it a ⭐ on GitHub!*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimizudev%2Fmiyuki-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshimizudev%2Fmiyuki-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimizudev%2Fmiyuki-pagination/lists"}