{"id":16694940,"url":"https://github.com/nyx-discord/nyx","last_synced_at":"2025-03-17T00:33:36.253Z","repository":{"id":211657443,"uuid":"729671813","full_name":"nyx-discord/nyx","owner":"nyx-discord","description":"A Typescript Discord.js framework.","archived":false,"fork":false,"pushed_at":"2025-02-16T05:17:41.000Z","size":13428,"stargazers_count":16,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T06:41:15.729Z","etag":null,"topics":["discord","discord-bot","discord-js","framework","typescript"],"latest_commit_sha":null,"homepage":"https://nyx-discord.github.io/nyx/docs","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/nyx-discord.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":"2023-12-10T00:56:38.000Z","updated_at":"2025-02-12T04:30:22.000Z","dependencies_parsed_at":"2024-03-03T07:26:08.571Z","dependency_job_id":"3f6eb562-f79d-46de-a720-5afb89f8a53a","html_url":"https://github.com/nyx-discord/nyx","commit_stats":{"total_commits":187,"total_committers":2,"mean_commits":93.5,"dds":"0.17647058823529416","last_synced_commit":"f236b1a0d5237e1a9c39a2b37e16481cbe61a26e"},"previous_names":["nyx-discord/nyx"],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyx-discord%2Fnyx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyx-discord%2Fnyx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyx-discord%2Fnyx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyx-discord%2Fnyx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nyx-discord","download_url":"https://codeload.github.com/nyx-discord/nyx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955668,"owners_count":20374371,"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","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":["discord","discord-bot","discord-js","framework","typescript"],"created_at":"2024-10-12T17:04:33.021Z","updated_at":"2025-03-17T00:33:36.247Z","avatar_url":"https://github.com/nyx-discord.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![nyx Logo](assets/nyx.png)\n\n---\n\nAn OOP framework for building feature-complete Discord bots.\n\n![Test Status](https://img.shields.io/github/actions/workflow/status/nyx-discord/nyx/test.yml?style=for-the-badge\u0026logo=jest\u0026label=Tests)\n[![Built with Typescript](https://img.shields.io/badge/Built%20with-Typescript-3176C6?style=for-the-badge\u0026logo=typescript\u0026logoColor=3178C6)](https://www.typescriptlang.org/)\n[![Discord Invite](https://img.shields.io/badge/Visit%20us%20in-Discord-5662f6?style=for-the-badge\u0026logo=discord\u0026logoColor=5662f6)](https://discord.gg/PQZmwaBZd5)\n\nThe core idea of nyx is to be easy to modify and extend, with no hardcoded implementations, meaning that all the default\nobjects can be completely replaced by your own if desired.\n\nThe original template that nyx is based on was greatly inspired by [Modbot](https://github.com/aternosorg/modbot).\n\n## 📖 Documentation\n\nnyx has two documentation sources:\n\n- [Typedoc](https://nyx-discord.github.io/nyx/typedoc), documenting classes, types and interfaces, so you can easily\n  explore the library through your browser.\n- [Docusaurus](https://nyx-discord.github.io/nyx/docs), which serves as a guide for how to use and modify the framework.\n\n## ✨ Features\n\nAll of these features are built upon interfaces (`@nyx-discord/core`), and nyx only includes default, recommended\nimplementations `@nyx-discord/framework`.\n\nThis means that you can build from scratch or extend each object and plug it into nyx with no problems, as long as they\nsatisfy the respective interface.\n\n### Commands\n\n- Complete application command support (slash commands or context menus).\n  - Add, remove and update commands (including their children) in runtime.\n  - Create components (buttons, select menus and modal submits) that trigger a command, with an easy API that allows\n    storing and retrieving extra data from the customId.\n- Intercept command execution with `CommandMiddlewares` (for general filtering) or `CommandFilters` (for command-specific filtering).\n- Use the `CommandExecutionMeta` to provide metadata to your commands from your filter, middleware or subscriber.\n- Subscribe to meta events in the `CommandEventBus` like command runs.\n- Completely override the command interaction listeners with your own for even more custom interaction handling.\n- Handle uncaught command errors on a built-in `ErrorHandler`.\n\n### Events\n\n- `EventBus` and `EventSubscriber` based event handling.\n- Enforced type safety when emitting and receiving events when using the provided or your custom `EventBuses`.\n- Store event metadata to share information about the event itself across subscribers.\n- Specify an `EventDispatcher` to change the way subscribers are called. By default, either:\n  - The `AsyncEventDispatcher` which allows a concurrency limit.\n  - The `SyncEventDispatcher` which allows a sync timeout limit before calling the next subscriber.\n- Intercept subscriber execution with `EventMiddlewares` (for general filtering) or `SubscriberFilters` (for subscriber-specific filtering).\n- Handle uncaught subscriber errors on a built-in `ErrorHandler`.\n\n### Schedules\n\n- Schedule actions to happen only at a certain time or every once on a while.\n- Stop and resume `Schedules` as needed.\n- Uses [Cron](https://crontab.guru/) to power the schedules.\n\n### Sessions\n\n- Create Sessions for making expirable, interactable user interfaces.\n  - Some common examples include, pagination, listing, guiding a user through a process, among others.\n- Allows routing interactions (buttons, select menus and modal submits) to the Session, to \"update\" their state and\n  answer accordingly.\n- Execute actions when a Session has already expired, but an interaction referencing that Session is received, such as\n  telling the user to execute a command again.\n\n### Plugins\n\n- Create your own plugins that can be loaded inside nyx to allow for even further extensibility.\n- Plugins can depend only on interfaces and not actual declarations by using the `@nyx-discord/core` package.\n\n### Feature execution interception\n\n- Allows for intercepting (cancelling) feature executions (commands, subscribers, schedules and sessions) on two\n  different ways:\n  - `Middlewares`, which are checked for every feature executed, for example, the `CommandManager`'s `CommandMiddleware`\n    is called on every command called. Allows appending your custom ones.\n  - A `Filter`, which is provided and checked once a specific object is called, for example, when your `UserInfoCommand`\n    is called.\n\n### Other\n\n- Flexible error handling for each feature.\n- Support for multiple bots running at the same time.\n  - 🚧 The framework only includes support for building multiple bots. Whether you'd like some kind of structure for\n    managing each of these bots is up to you.\n\n## 🌐 License\n\nnyx is licensed under the [MIT License](https://github.com/Amgelo563/nyx/blob/main/LICENSE).\n\nIf you don't understand it or don't want to bother reading it all, here's what you need to know:\n\n- **✅ You can:** Modify the software for your personal or public usage, distribute it freely or commercially.\n\n- **❌ You can't:** Change the license, though you can include it inside a proyect with a more restrictive license, but\n  the original code stays licensed under MIT.\n\n- **📝 You need:** To include the copyright (`LICENSE` file) inside the modified code.\n\nYou don't need to explicitly give credit to this repository (all the credit is inside `LICENSE` already), but I'll be\ngrateful if you do so 💙.\n\n## 🚧 Disclaimers\n\n- Built-in DB related objects are not included. This is mostly due to compatibility reasons, since there's no easy way\n  to make a structure for handling databases that fits every developers and databases' needs, allowing the flexibility\n  that nyx aims for.\n\n  You're welcome to open an issue or a PR if you have an idea on how to tackle this issue, but for now, making an\n  external object, using declaration merging, or making a plugin for it is advised.\n\n- There are no plans for built-in message command support. There are many reasons including the reasonable lack of\n  support from Discord, difficult way to parse them into convenient objects like the `CommandInteractionOptionResolver`,\n  among others.\n\n  If you need it, you're welcome to add it by making an external object, using declaration merging, or making a plugin\n  for it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyx-discord%2Fnyx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyx-discord%2Fnyx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyx-discord%2Fnyx/lists"}