An open API service indexing awesome lists of open source software.

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.

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);
});
```