ecord
v14.14.1-1.0.7
Published
Easy Discord bot builders
Downloads
67
Readme
Easy Discord
Create a Discord bot with just a few lines.
bun add ecord
npm add ecord
pnpm add ecord
yarn add ecord
Quick Start
// src/index.js
import { EClient, GatewayIntentBits } from "ecord";
const client = new EClient({
intents: [GatewayIntentBits.Guilds],
paths: {
commands: "src/commands/*.js",
listeners: "src/events/*.js",
},
});
client.login("YOUR_BOT_TOKEN");
ECommand
// src/commands/ping.js
import { ECommand } from "ecord";
export default new ECommand()
.setName("ping")
.setDescription("Display application's ping")
.setExecutable((interaction) => {
interaction.reply(`${interaction.client.ws.ping}`);
});
EListener
// src/listeners/ready.js
import { EListener } from "ecord";
export default new EListener("ready").setOnce(true).setExecutable((client) => {
console.log(`Logged as ${client.user.tag}`);
});
License
Refer to the LICENSE.