mirror of
https://github.com/sern-handler/handler
synced 2026-06-25 09:12:15 +00:00
74378f0f12cf5d16b90ddbc01fb42505e0235c39
* chore: fix tsc predicate type checking * build: add tsup as bundler * chore: revert text * chore: fix predicates.ts, update dependencies, bump version * docs: update example * build: update dependencies * fix: crash on collectors (#89) * fix: crash on collectors * feat: bump version for bug fix * fix: crash on collectors pt * docs: adding some documentation for docasaurus * docs: add errors.ts comments * docs: refactor comments * docs: adding examples * feat: refresh package-lock.json * refactor: destructure and clean namespaces * feat: add regen package.json script * feat: add tsup, remove tsc, add scripts * feat: update ts-results import style * feat: readd typescript because idk if i should * feat: breakup tsconfigs and add tsup config * feat: add esm json tsconfig to git * build: update dependencies and move to ts-result-es * feat: remove unused function * feat: update ts-results for esm/cjs interop! * revert: remove version.txt * build: goodbye tsc, hello tsup * build: moving discord.js as dev dependency * style: requested changes * feat: add tsc back ( i missed you ) * build: bump version -> 1.0.0 * feat: syncing to main * style: pretty * feat: fix tsconfig issues with tsup * revert: remove ExternallyUsed * feat: update scripts * build: update tsup and pkg-lock.json * feat: refresh package-lock.json * feat: test
SernHandler
A customizable, batteries-included, powerful discord.js framework to automate and streamline your bot development.
Installation
npm install @sern/handler
yarn add @sern/handler
pnpm add @sern/handler
Basic Usage
index.js (CommonJS)
const { Client, GatewayIntentBits } = require('discord.js');
const { Sern } = require('@sern/handler');
const { defaultPrefix, token } = require('./config.json');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages
]
});
Sern.init({
client,
defaultPrefix,
commands : 'src/commands',
});
client.login(token);
ping.js (CommonJS)
const { Sern, CommandType } = require('@sern/handler');
exports.default = {
description: 'A ping pong command',
type: CommandType.Slash,
execute(ctx) {
ctx.reply('pong!');
}
};
See our templates for TypeScript examples and more
CLI
It is highly encouraged to use the command line interface for your project. Don't forget to view it.
Links
Contribute
- Read our contribution guidelines carefully
- Pull up on issues and report bugs
- All kinds of contributions are welcomed.
Roadmap
You can check our roadmap to see what's going to be added or patched in the future.
Languages
TypeScript
100%