1.1.2 • Published 2 years ago

djs-aura v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

About

DJS-aura is a Node.js module that interactively supports Discord.js at the same time.

Installation

Requirements

Optional Packages

  • spud.js - A package that can easily paginate interactions (v3.0.0-dev.3 or newer)

Installing

Now, let's start installing by the package manager you use.

npm install djs-aura
yarn add djs-aura
pnpm add djs-aura

Getting Started

Requiring

Define this package and name it as you want.

// CommonJS
const Aura = require('djs-aura');

// Module
import Aura from 'djs-aura';

Usage

Let's make your bot online and ready-to-go!

new Aura.Client({
	commands: {
		message: 'src/MessageCommands', // Example
		slash: 'src/SlashCommands', // Example
	},
	prefix: <prefix>, // Not required for slash commands
	token: <token>,
});

Note: To add no prefix for your messages, set the option prefix as an empty string

That's it - Your bot is online loaded with multitudes of commands!

Tools

Custom Handling

If you want to add your new event file (e.g: guildMemberAdd) or if you want to replace our default handler file with your own one, you can add it by using this tool.

// ...

new Aura.Client({
	/* ... */
	custom: {
		events: ['src/events/guildMemberAdd'], // Example
		handlers: ['src/handlers/modalHandler'], // Example
	}
})

Note: Custom options (events, handlers) has to be an array.

Swear Filter

You can block people saying prohibited words by using this tool. If you want to add more custom words, you can use the custom option. Oppositely, to remove existing words from the list, you can use the the remove option.

// ...

await client.Tools.FilterSwear({ custom: ['dog'], remove: ['dog'] }); // Example

Note: Put the custom or remove option as an empty string if you don't want any custom or remove options

Examples

Client

const client = new Aura.Client({
	commands: {
		message: 'src/msgCmds',
		slash: 'src/slashCmds',
	},
	token: process.env.token,
});

Swear Filter

// ...

await client.Tools.FilterSwear({ custom: ['dog'], remove: ['dog'], })

Help

Need some help? You can join our support server or create an issue on the official repository. Please double-check that it hasn't already been issued or suggested.