Aidyn is a lightweight, class-based framework designed for rapidly building Discord bot commands, abstracting away much of the boilerplate associated with `discord.js` interaction. It is currently at version 1.1.1, indicating a relatively early but stable stage of development. While no explicit release cadence is stated, its versioning suggests a focused development approach. Key differentiators include its class-based command architecture, native TypeScript support (as the project is built in TypeScript), built-in state management for data handling between commands, and an integrated feature for automatic database backup specifically with MongoDB. It aims to let developers jump straight to business logic for their bot commands, providing a structured approach on top of `discord.js`.
npm install aidynVerified import paths — ran on the pinned version, not inferred.
Initializes and starts a Discord bot using Aidyn, defining a simple command that responds with processed message content. This example demonstrates class-based command creation and bot setup with environment variables for credentials.
Set `Logging: 0` or `Logging: 1` in the Aidyn constructor. Avoid `Logging: 2` unless specifically debugging a critical issue and understand the performance implications.
Ensure you have a MongoDB instance and a valid connection string if you plan to use Aidyn's database features. For other databases, implement custom data handling outside of Aidyn's provided mechanisms.
Always use `import ... from 'aidyn'` for importing Aidyn components. Ensure your project's `package.json` is configured for ESM where appropriate (e.g., `"type": "module"`).
Ensure your Node.js environment is at least v8 LTS. For best compatibility and security, it is recommended to use an active LTS version of Node.js (e.g., Node.js 18 or 20).
Verify that `BotToken` in the Aidyn constructor is correct and that your bot has all necessary intents and permissions enabled in the Discord Developer Portal.
Double-check your `ConnectionString` in the Aidyn constructor. Ensure the MongoDB server is accessible from where your bot is hosted and that no firewalls are blocking the connection.
Add `import { Command } from 'aidyn';` to the top of your file where you define custom commands.Ensure you have `const aidyn = new Aidyn({...});` before calling `aidyn.start(commands);`. Double-check the casing and spelling of the method name.