disfox
v0.0.8
Published
Disfox is a framework that simplifies and organizes discord.js development.
Maintainers
Readme
Disfox is a framework that enhances and organizes discord.js development, making building Discord applications faster, cleaner, and more structured.
Examples and documentation available in Official Documentation Site
Install
npm install disfox
yarn add disfox
pnpm add disfox
bun add disfox
Key Features
- Result Pattern for consistent and predictable handling
- Centralized Client and Application management
- Simplified path and directory handling
- Simplified file system utilities
- Dedicated Slash Command service
- Scalable and flexible configuration system
Compatibility
Disfox is currently not compatible with CommonJS.
Only ES Modules (ESM) are supported.
Example usage
import { Client, GatewayIntentBits, ActivityType, Events } from "discord.js";
import { Application, SlashService } from "disfox";
const client = new Client({
intents: [GatewayIntentBits.MessageContent]
});
const app = new Application({
token: process.env.TOKEN,
client: client
});
await app.connect();
await app.actions.setPresence(
ActivityType.Playing,
"⭐ Ready! /help",
"online"
);
app.client.on(Events.ClientReady, async () => {
const command = await SlashService.extractFile("./commands/ping.js");
// deploy globally
await app.slash.deployGlobal([command]);
// listen for interactions
app.slash.listen({
onError: {
message: "Error occurred. Try again later.",
flags: 64
}
});
});
Status
The framework is still under development. All suggestions and ideas are very welcome.
Community Server
Join our Discord for support, questions, and suggestions:
https://discord.gg/UuZnAuhhP6
