velora
v14.14.1-1.0.4
Published
Discord.js based extensions
Downloads
9
Readme
Velora
Create a Discord bot with just a few lines.
bun add velora
npm add velora
pnpm add velora
yarn add velora
Quick Start
// Or require() for CommonJS modules
import { GatewayIntentBits, VeloraClient } from "velora";
const client = new VeloraClient({
intents: [GatewayIntentBits.Guilds],
paths: {
commands: "src/commands/**/*.js",
events: "src/events/**/*.js",
},
});
client.login("YOUR_BOT_TOKEN");
With TypeScript
import { GatewayIntentBits, VeloraClient } from "velora";
const client = new VeloraClient({
intents: [GatewayIntentBits.Guilds],
paths: {
commands: "src/commands/**/*.ts",
events: "src/events/**/*.ts",
},
});
client.login("YOUR_BOT_TOKEN");
VeloraCommand
import { VeloraCommand } from "velora";
export default new VeloraCommand()
.setName("ping")
.setDescription("Display the application's ping")
.setExecutable((interaction) => {
interaction.reply(interaction.client.ws.ping.toString());
});
VeloraEvent
import { VeloraEvent } from "velora";
export default new VeloraEvent("ready")
.setOnce(true)
.setExecutable((client) => {
console.log(`Logged as ${client.user.tag}`);
});
License
Refer to the LICENSE.