-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
18 lines (17 loc) · 676 Bytes
/
app.js
File metadata and controls
18 lines (17 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require("dotenv").config()
const {readdirSync} = require('fs')
require("./setup/index").then(() => {
const interactionCommands = new Map();
const interactions = readdirSync("./interactions/").filter(f => f.endsWith(".js") && !f.startsWith("help"));
for(const file of interactions){
const command = require("./interactions/"+file);
interactionCommands.set(command.info.name, command);
}
const databaseHandler = require("./modules/databaseHandler");
const bot = require("./bot");
module.exports.interactionCommands = interactionCommands;
databaseHandler.emitter.on("ready", () => {
bot();
})
})
.catch(console.error);