mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
move MPDB.sync() to init()
This commit is contained in:
parent
a712ad0881
commit
701a6bb2c9
@ -3,6 +3,7 @@ import fs from 'node:fs';
|
|||||||
import { Database } from './database';
|
import { Database } from './database';
|
||||||
import timeNames from './timeNames';
|
import timeNames from './timeNames';
|
||||||
import { Punishment, formatTimeOpt, createTableOpt, punOpt } from './typings/interfaces';
|
import { Punishment, formatTimeOpt, createTableOpt, punOpt } from './typings/interfaces';
|
||||||
|
import MPDB from './models/MPServer';
|
||||||
export class TClient extends Client {
|
export class TClient extends Client {
|
||||||
invites: Map<any, any>;
|
invites: Map<any, any>;
|
||||||
commands: Discord.Collection<string, any>;
|
commands: Discord.Collection<string, any>;
|
||||||
@ -66,6 +67,7 @@ export class TClient extends Client {
|
|||||||
this.setMaxListeners(80)
|
this.setMaxListeners(80)
|
||||||
}
|
}
|
||||||
async init(){
|
async init(){
|
||||||
|
MPDB.sync();
|
||||||
this.login(this.tokens.token_toast);
|
this.login(this.tokens.token_toast);
|
||||||
this.punishments.initLoad();
|
this.punishments.initLoad();
|
||||||
this.bannedWords.initLoad();
|
this.bannedWords.initLoad();
|
||||||
|
@ -32,5 +32,4 @@ MPDB.init({
|
|||||||
allowNull: false
|
allowNull: false
|
||||||
}
|
}
|
||||||
}, { sequelize: db, modelName: 'urls', timestamps: false });
|
}, { sequelize: db, modelName: 'urls', timestamps: false });
|
||||||
MPDB.sync();
|
|
||||||
export default MPDB
|
export default MPDB
|
Loading…
Reference in New Issue
Block a user