Getting Started
@thezombiepl/zombieclient is a plugin-based framework built on top of discord.js v15. It provides a structured, loader-driven architecture for Discord bots.
Installation
The library requires discord.js v15 as a peer dependency.
bash
bun add @thezombiepl/zombieclient
bun add discord.js@15.0.0-dev.1784246195-c73e2a76d @discordjs/builders @discordjs/formattersBasic Setup
This is the canonical way to wire up a ZombieClient bot:
ts
import { GatewayIntentBits } from 'discord.js';
import 'dotenv/config';
import path from 'node:path';
import ZombieClient from '@thezombiepl/zombieclient';
import { CommandLoader, EventLoader } from '@thezombiepl/zombieclient/loaders';
const client = new ZombieClient({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers],
ownerId: process.env.OWNER_ID,
loaders: [
new CommandLoader(path.resolve(process.cwd(), 'src/commands'), {
autoDeploy: true,
useGlobal: true,
defaultGuilds: [process.env.TEST_GUILD_ID!],
defaultCooldown: 5,
}),
new EventLoader(path.resolve(process.cwd(), 'src/events')),
],
});
await client.login(process.env.TOKEN);