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
|
// Initialization function
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
// Load modules
|
|
||||||
|
|
||||||
// Load events
|
// Load events
|
||||||
fs.readdir('./events', (err, files) => {
|
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.`)
|
client.logger.info(`Loading ${files.length} events.`)
|
||||||
files.forEach(file => {
|
files.forEach(file => {
|
||||||
if (!file.endsWith('.js')) {
|
if (!file.endsWith('.js')) {
|
||||||
|
@ -78,7 +81,12 @@ const init = async () => {
|
||||||
|
|
||||||
// Load commands
|
// Load commands
|
||||||
fs.readdir('./commands', (err, files) => {
|
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.`)
|
client.logger.info(`Loading ${files.length} commands.`)
|
||||||
files.forEach(file => {
|
files.forEach(file => {
|
||||||
if (!file.endsWith('.js')) {
|
if (!file.endsWith('.js')) {
|
||||||
|
|
Loading…
Reference in a new issue