mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
dad3042a644b0e47d01319f48eefe01632678cc3
Sern Handler
Sern automates and streamlines development your discord bot with new version compatibility and full customization.
- A reincarnation of this old project
Installation
npm install sern-handler
yarn add sern-handler
pnpm add sern-handler
Basic Usage
Typescript
import { Client, Intents } from 'discord.js'
import { Sern } from 'sern-handler';
import { prefix, token } from '../src/secrets.json';
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MEMBERS
]
});
new Sern.Handler({
client,
prefix,
commands : 'dist/commands', // If using typescript, target your outDir/~
privateServers : [
{
test : true,
id: 'server-id'
}
],
init: async (handler : Sern.Handler) => {
// Optional function to initialize anything else on bot startup
},
});
JavaScript
import { Client, Intents } from 'discord.js';
import { Sern } from 'sern-handler';
import { prefix, token } from '../src/secrets.json';
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MEMBERS
]
});
new Sern.Handler({
client,
prefix,
commands : 'dist/commands',
privateServers : [
{
test : true,
id: 'server-id'
}
],
init: async (handler) => {
// Optional function to initialize anything else on bot startup
},
});
client.login(token);
Links 
- 📑 Official Documentation
- 🎧 Discord Server
Contribute 😄
- Pull up on issues and tell me if there are bugs
- All kinds of contributions are welcomed!
Languages
TypeScript
100%