mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
32 lines
734 B
TypeScript
32 lines
734 B
TypeScript
![]() |
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();
|
||
|
});
|