https://github.com/snippik/djs-framework
A framework that simplifies the process of creating commands, components (buttons, selectors), events, etc.
https://github.com/snippik/djs-framework
discord-slash-commands discordjs-command-handler discordjs-framework discordjs-v14
Last synced: 10 months ago
JSON representation
A framework that simplifies the process of creating commands, components (buttons, selectors), events, etc.
- Host: GitHub
- URL: https://github.com/snippik/djs-framework
- Owner: SNIPPIK
- License: bsd-3-clause
- Created: 2025-08-28T13:14:12.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-28T15:11:05.000Z (10 months ago)
- Last Synced: 2025-08-28T21:13:29.080Z (10 months ago)
- Topics: discord-slash-commands, discordjs-command-handler, discordjs-framework, discordjs-v14
- Language: TypeScript
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple framework for discord.js
- Support: SlashCommand, Components (Buttons, Selectors), Middlewares, Events
- Detail: Application User Commands, Guild Commands, Private Commands, User Commands
### Fast Example
- For more details see [here](https://github.com/SNIPPIK/djs-framework/tree/main/.example)
```ts
import { Client } from "discord.js";
import { DjsFramework } from "snpk-djs-framework";
const client = new Client({
// Bot intents
intents: [
"Guilds",
"GuildMessages",
"DirectMessages",
"GuildVoiceStates",
]
});
// Load DjsFramework
const djs_frame = new DjsFramework({
locations: {
base: "src",
commands: "handlers/commands",
events: "handlers/events",
components: "handlers/components",
middlewares: "handlers/middlewares"
},
ownerIDs: ["312909267327778818"],
failCallbacks: {
onDontOwner: (ctx) => {
console.log(ctx);
},
onPermissionsClient: (ctx) => {
console.log(ctx);
},
onPermissionsUser: (ctx) => {
console.log(ctx);
}
}
});
// Login
client.login("").then(() => {
djs_frame.register(client);
});
```