Files
handler/README.md
EvolutionX 9a3e9ed193 updated
2022-02-14 22:05:12 +05:30

1.3 KiB

Sern

Sern is making easier to create & automate your discord bot with new version compatibility and full customization.

Installation

npm install sern-handler
yarn add sern-handler

Basic Usage

Typescript

import { Client } from 'discord.js';
import { Intents } from 'discord.js';
import { prefix, token } from '../src/secrets.json';
import { Sern } from 'sern-handler';

const client = new Client({
    intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MEMBERS],
});

new Sern.Handler({
    client,
    prefix,
    commands: 'dist/commands', // after compiling with tsc 
    privateServers: [
        {
            test: true,
            id: 'server id',
        },
    ],
    init: async (handler: Sern.Handler) => {
        /* an optional function to initialize anything else on bot startup */
    },
});

client.login(token);
  • 📑 Official Documentation
  • 🎧 Discord Server

Contribute 😄

  • Pull up on issues and tell me if there are bugs
  • All kinds of contributions are welcomed!