mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-13 21:35:02 +00:00
Initial commit in new repository
This commit is contained in:
commit
23c78f2c9c
15 changed files with 4048 additions and 0 deletions
31
src/index.ts
Normal file
31
src/index.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
require("dotenv").config();
|
||||
|
||||
process.on("unhandledRejection", (reason, p) => {
|
||||
// tslint:disable-next-line
|
||||
console.error(reason);
|
||||
process.exit();
|
||||
});
|
||||
|
||||
import { Client } from "eris";
|
||||
import { Knub } from "knub";
|
||||
import { BotControlPlugin } from "./plugins/BotControl";
|
||||
import { ModActionsPlugin } from "./plugins/ModActions";
|
||||
import { UtilityPlugin } from "./plugins/Utility";
|
||||
import knex from "./knex";
|
||||
|
||||
// Run latest database migrations
|
||||
knex.migrate.latest().then(() => {
|
||||
const client = new Client(process.env.TOKEN);
|
||||
|
||||
const bot = new Knub(client, {
|
||||
plugins: {
|
||||
utility: UtilityPlugin,
|
||||
mod_notes: ModActionsPlugin
|
||||
},
|
||||
globalPlugins: {
|
||||
bot_control: BotControlPlugin
|
||||
}
|
||||
});
|
||||
|
||||
bot.run();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue