Natsuki's API!
https://api.natsuki.app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
378 B
10 lines
378 B
const fs = require('fs');
|
|
|
|
module.exports = app => {
|
|
app.db.models = {ani: {}, bot: {}};
|
|
fs.readdirSync('../db/ani').filter(file => file.endsWith('.js')).forEach(file => {
|
|
const model = require(`./ani/${file}`)(app.db.ani);
|
|
app.db.models.ani[model.modelName] = model;
|
|
});
|
|
console.log(`Built ${Object.keys(app.db.models.ani).length} models\n`);
|
|
}; |