forked from embee/woomy
Merge branch 'next' of https://www.github.com/mudkipscience/woomy into next
This commit is contained in:
parent
4a36da8d27
commit
0f2f8b0318
1 changed files with 12 additions and 4 deletions
16
index.js
16
index.js
|
@ -61,11 +61,14 @@ client.aliases = new Discord.Collection()
|
|||
|
||||
// Initialization function
|
||||
const init = async () => {
|
||||
// Load modules
|
||||
|
||||
// Load events
|
||||
fs.readdir('./events', (err, files) => {
|
||||
if (err) {}
|
||||
if (err) {
|
||||
client.logger.error('Failed to get files in events directory! ' + err);
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
client.logger.info(`Loading ${files.length} events.`)
|
||||
files.forEach(file => {
|
||||
if (!file.endsWith('.js')) {
|
||||
|
@ -78,7 +81,12 @@ const init = async () => {
|
|||
|
||||
// Load commands
|
||||
fs.readdir('./commands', (err, files) => {
|
||||
if (err) {}
|
||||
if (err) {
|
||||
client.logger.error('Failed to get files in commands directory! ' + err);
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
client.logger.info(`Loading ${files.length} commands.`)
|
||||
files.forEach(file => {
|
||||
if (!file.endsWith('.js')) {
|
||||
|
|
Loading…
Reference in a new issue