Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d3oxy/djs-commands
💡 Unleash the potential of your Discord.js bot with DJS-Commands, the intuitive command handling library.
https://github.com/d3oxy/djs-commands
automation command command-handler command-handler-v14 commands discord discord-js event-handler-v14 events tool utility
Last synced: 3 days ago
JSON representation
💡 Unleash the potential of your Discord.js bot with DJS-Commands, the intuitive command handling library.
- Host: GitHub
- URL: https://github.com/d3oxy/djs-commands
- Owner: D3OXY
- License: mit
- Created: 2023-03-10T13:23:46.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-13T15:53:29.000Z (about 1 year ago)
- Last Synced: 2024-12-20T00:14:12.520Z (3 days ago)
- Topics: automation, command, command-handler, command-handler-v14, commands, discord, discord-js, event-handler-v14, events, tool, utility
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@d3oxy/djs-commands
- Size: 348 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
![alt Discord](https://img.shields.io/discord/756751516169142323?color=7289da&logo=discord&logoColor=white) ![alt GitHub Repo](https://img.shields.io/github/stars/D3OXY/djs-commands?style=social)
![alt DJSCommands](https://nodei.co/npm/@d3oxy/djs-commands.png)
# DJSCommands
DJS-Commands is a lightweight, easy-to-use command handling library for Discord.js bots. It's designed to make it easy for developers to add custom commands to their bots without having to write all the boilerplate code themselves.
## Features
- Simple command creation and management
- Supports Legacy commands and Slash commands
- Well written, easy to follow [documentation](https://djscommands.deoxy.dev)
- Custom command validations
- Command aliases
- Dynamic argument validation
- Easy integration with existing Discord.js bots
- Lightweight and fast
- Event Handler
- Feature handler# Installation
You can install DJS-Commands via npm:
```bash
npm install @d3oxy/djs-commands
```
# Usage
You can find the full documentation [here](https://djscommands.deoxy.dev).
Here's a basic example of how to use DJS-Commands in your bot:### Javascript
```js
const { Client, IntentsBitField, Partials } = require("discord.js");
const path = require("path");
const CommandHandler = require("@d3oxy/djs-commands");require("dotenv").config();
const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.MessageContent,
IntentsBitField.Flags.GuildMembers,
],
partials: [Partials.Channel],
});client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}!`);
new CommandHandler({
client, // Required
mongoUri: process.env.MONGO_URI, // Optional
commandDir: path.join(__dirname, "commands"),
featuresDir: path.join(__dirname, "features"),
defaultPrefix: "!", // Default
events: {
dir: path.join(__dirname, "events"),
},
});
});
client.login("YOUR_BOT_TOKEN");
```### Typescript
```js
import { Client, IntentsBitField, Partials } from "discord.js";
import path from "path";
import CommandHandler from "@d3oxy/djs-commands";
require("dotenv").config();const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.MessageContent,
IntentsBitField.Flags.GuildMembers,
],
partials: [Partials.Channel],
});client.on("ready", () => {
console.log(`Logged in as ${client.user?.tag}!`);
new CommandHandler({
client, // Required
mongoUri: process.env.MONGO_URI, // Optional
commandDir: path.join(__dirname, "commands"),
featuresDir: path.join(__dirname, "features"),
defaultPrefix: "!", // Default
events: {
dir: path.join(__dirname, "events"),
},
});
});
client.login("YOUR_BOT_TOKEN");
```# Documentation
You can find the full documentation [here](https://djscommands.deoxy.dev).
- [Home Page](https://djscommands.deoxy.dev)
- [Installation](https://djscommands.deoxy.dev/getting-started/installation)
- [Getting Started](https://djscommands.deoxy.dev/getting-started)
- [Project Setup - Typescript](https://djscommands.deoxy.dev/getting-started/project-setup-typescript)
- [Project Setup - Javascript](https://djscommands.deoxy.dev/getting-started/project-setup-javascript)# Contributing
Contributions are welcome! If you find a bug or have a feature request, please create an issue on the [GitHub repository](https://github.com/D3oxy/djs-commands/issues). If you'd like to contribute code, please fork the repository and submit a pull request.
## License
DJSCommands is released under the [MIT License](https://github.com/D3oxy/djs-commands/blob/main/LICENSE).
---