Repository navigation
Package System
FCDex uses a modular package architecture designed to keep features organized and easier to maintain.
Each package handles a specific area of functionality. This allows features to be developed separately and enabled as the project grows.
Note
The package system is under development. Some packages listed below may not be implemented yet.
| Package | Purpose |
|---|---|
clubs |
Club collecting and catch interactions |
players |
Player-related features |
trade |
Trading between users |
battle |
Battles and competitive features |
economy |
Economy and progression |
admin |
Administrative commands and controls |
specials |
Special collectibles and events |
guilds |
Server-specific functionality |
groups |
Group-related features |
fcscript |
FCDex scripting system |
Package names and responsibilities may change during development.
Packages live inside src/packages/.
The intended structure looks like this:
src/
└── packages/
├── loader.ts
├── clubs/
│ └── index.ts
├── battle/
│ └── index.ts
├── trade/
│ └── index.ts
└── economy/
└── index.ts
This is an illustrative example. Only directories that actually exist in your version are available.
The package loader is responsible for discovering packages and registering enabled features with the Discord client.
A dedicated loader.ts keeps package-loading logic separate from the main application entry point.
The intended loading process is:
- Discover available package directories.
- Check which packages are enabled in the configuration.
- Load each enabled package.
- Register its commands, event handlers, or other functionality.
- Report loading errors.
The exact behavior depends on the implemented loader.
Package settings are managed through the local configuration file.
Before enabling a package, verify that:
- Its directory and entry point exist.
- Its dependencies are installed.
- Its configuration requirements are satisfied.
- It is compatible with the current FCDex version.
Enabling a package in the configuration does not mean its functionality is already implemented.
When adding a new package:
- Create its directory under
src/packages/. - Add the package entry point.
- Follow the package interface used by the project.
- Register the required commands and event handlers.
- Add configuration options where necessary.
- Handle errors and clean up resources appropriately.
- Update the documentation when the feature is ready.
Follow the conventions of existing packages to keep the architecture consistent.
The package architecture will expand as more FCDex features are implemented.
FCScript and BallsDex migration tooling are planned for a later development phase, after the core bot and administration panel are developed.
Their interfaces and documentation will be added when those systems are ready.
Collect the clubs. Build your legacy.
An open-source football club collecting bot for Discord.
GitHub Repository · Discord Community · Report a Bug
Explore the Wiki
Home · Installation · Configuration · Database Setup · Running FCDex · Package System · Troubleshooting · Contributing
Released under the MIT License · Built for football fans and Discord communities.
© FCDex contributors. All rights reserved where applicable under the MIT License.