0.2.2 • Published 2 years ago

discord-extend v0.2.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

About

An extended version of the discord.js package with extra features for easier bot development

Installation

npm install discord-extend
yarn add discord-extend
pnpm add discord-extend

Optional packages

Refer to the discord.js readme for optional packages

Example usage

Install the required dependencies:

npm install discord-extend discord.js
yarn add discord-extend discord.js
pnpm add discord-extend discord.js

Creating a bot:

const { Client } = require("discord-extend");
const { Intents } = require("discord.js");
const { join } = require("path");

const client = new Client({
    intents: [Intents.FLAGS.GUILDS],
    registerEvents: false
});

client.addEventsIn(join(__dirname, "events"));
client.registry.registerCommandsIn(join(__dirname, "commands"));
client.registry.registerCommandChecksIn(join(__dirname, "checks"));

Making a command:

const { SlashCommand } = require("discord-extend");

module.exports = class ExampleCommand extends SlashCommand {
	constructor(){
		super({
			name: "example",
			description: "An example discord-extend command"
		});
	}

	run(interaction){
		interaction.reply("Example worked!");
	}
}

Links

Contributing

Before you create an issue, please take a look if it has already been reported or suggested, also check the latest documentation.

See the guide to contributing to submit a PR.

Help

If you are having problems with discord-extend, you are welcome to join the Discord-Extend Server

0.2.1

2 years ago

0.2.0

2 years ago

0.2.2

2 years ago

0.1.2

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago