Skip to content

Saigeie/Ying-Yang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YingYang

Ying yang is a simple discord.js command handler, it has support for default commands, events, built in command handler and so much more + more planned!

npm i ying-yang

Example:

This example below is an example of it in Javascript as ts types are currently in the works!

const YingYang = require("yingyang");
require("dotenv").config();

const client = new YingYang({
  commandDirectory: `example/commands`, // Your commands directory ( starts from the process cwd )
  eventDirectory: `example/events`, // Your events directory ( starts from the process cwd )
  addDefaultCommands: true, // Add built in commands
  mongoConnection: process.env.MONGODB, // Mongodb URI
  defaultPrefix: "!" // A command prefix
});

client.start({ token: process.env.TOKEN }); // Login the client

Command Example:

const { Command } = require("yingyang");

module.exports = new Command({
    name: `ping`,
    description: `ping command`,
    category: "misc",
    aliases: ["p"],
    execute: async ({ ctx, client }) => {
        ctx.reply({ content: `${client.ws.ping}ms`})
    }
})

About

A simple discord.js handler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published