djs-aura v1.1.2
About
DJS-aura is a Node.js module that interactively supports Discord.js at the same time.
Installation
Requirements
- Node.js -
v16.9.0or newer. - Discord.js -
v14.0.0or newer.
Optional Packages
- spud.js - A package that can easily paginate interactions (
v3.0.0-dev.3or newer)
Installing
Now, let's start installing by the package manager you use.
npm install djs-aura
yarn add djs-aura
pnpm add djs-auraGetting 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'] }); // ExampleNote: 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.
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago