Created
November 26, 2020 07:19
-
-
Save limxuan/66ca88e4027875103e09c5f4a804f345 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
readdirSync("./events/").forEach((file) => { | |
const events = readdirSync("./events/").filter((file) => | |
file.endsWith(".js") | |
); | |
for (let file of events) { | |
let pull = require(`../events/${file}`); | |
if (pull.name) { | |
client.events.set(pull.name, pull); | |
} else { | |
continue; | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment