1.0.4 • Published 1 year ago

dishora v1.0.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

Dishora

A framework extension of the discord.js library. This isn't for public use, there will not be a documentation or guide on how to use this framework.

Requirements

Installation

Node.js 16.9.0 or newer is required.

npm install dishora

Initializing a new Client

const { Client, GatewayIntentBits } = require("dishora");

const client = new Client({
    intents: [GatewayIntentBits.Guilds],
    token: "YOURTOKEN",
    mongo: "YOURMONGO",
    directories: {
        commands: "./commands",
        events: "./events"
    }
});
client.init("10");

Creating a new Event

const { Event } = require("dishora");

const event = new Event({
    event: "ready",
    on: async function(client) {
        console.log("Online!");
    };
});

Creating a new Command

const { Command, SlsahCommandBuilder } = require("dishora");
const Discord = require("discord.js");

const command = new Command({
    data: new SlashCommandBuilder()
    .setName("ping")
    .setDescription("Get the client's response time."),
    run: async function(interaction) {
        interaction.reply(`${interaction.client.ws.ping}ms`);
    }
});