Skip to content

A framework that simplifies the process of creating commands, components (buttons, selectors), events, etc.

License

Notifications You must be signed in to change notification settings

SNIPPIK/djs-framework

Repository files navigation

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

About

A framework that simplifies the process of creating commands, components (buttons, selectors), events, etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published