- Support: SlashCommand, Components (Buttons, Selectors), Middlewares, Events
- Detail: Application User Commands, Guild Commands, Private Commands, User Commands
- For more details see here
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);
});