eris-command-framework
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

Eris Command Framework

You should probably just use slash commands now...

This framework is based around the idea of PluginInterface, and CommandInterfaces.

a Plugin (that implements PluginInterface) has Commands, that are annotated by @Command()

Usage

Requirements
  • TypeORM
  • Inversify
import {CommandFramework, Interfaces, types} from 'eris-command-framework';

const container = new Container({defaultScope: 'singleton'});
const commandFramework = new CommandFramework(container, {prefix: '|'}); // Prefix is required

const connection: Connection = await createConnection(
    {
        autoSchemaSync: true,
        driver:         {
            database: process.env.DATABASE_NAME,
            host:     process.env.DATABASE_HOST,
            port:     process.env.DATABASE_PORT,
            username: process.env.DATABASE_USER,
            password: process.env.DATABASE_PASSWORD,
            type:     "mysql",
            extra:    {
                supportBigNumbers: true,
                bigNumberStrings:  true,
            },
        },
        entities:       [
            // Your entities here,
            ...commandFramework.GetEntities()
        ],
    },
);


container.bind<Connection>(types.Connection).toConstantValue(connection);

const plugins: Interfaces.PluginInterface[] = [
    // Array of PluginInterfaces
];

// Finish setting up your container
await commandFramework.Initialize(plugins);

/eris-command-framework/

    Package Sidebar

    Install

    npm i eris-command-framework

    Weekly Downloads

    2

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    245 kB

    Total Files

    255

    Last publish

    Collaborators

    • aequasi