https://github.com/cryptiklemur/eris-command-framework
https://github.com/cryptiklemur/eris-command-framework
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cryptiklemur/eris-command-framework
- Owner: cryptiklemur
- License: mit
- Created: 2018-12-15T07:06:34.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-06-18T13:18:26.000Z (almost 2 years ago)
- Last Synced: 2025-02-01T15:45:19.704Z (over 1 year ago)
- Language: TypeScript
- Size: 527 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```typescript
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(types.Connection).toConstantValue(connection);
const plugins: Interfaces.PluginInterface[] = [
// Array of PluginInterfaces
];
// Finish setting up your container
await commandFramework.Initialize(plugins);
```