Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from PjrCodes/master
Browse files Browse the repository at this point in the history
DS store checks
  • Loading branch information
vachanmn123 authored Oct 30, 2021
2 parents 3a3a423 + d947baa commit 3e117e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,5 @@ dist

./config.json
config.json

.DS_Store
3 changes: 3 additions & 0 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const commandFolders = fs.readdirSync("./commands");
// Loop through all files and store commands in commands collection.

for (const folder of commandFolders) {
if (folder==".DS_Store") {continue;}
const commandFiles = fs
.readdirSync(`./commands/${folder}`)
.filter((file) => file.endsWith(".js"));
Expand Down Expand Up @@ -137,10 +138,12 @@ const contextMenus = fs.readdirSync("./interactions/context-menus");
// Loop through all files and store slash-commands in slashCommands collection.

for (const folder of contextMenus) {
if (folder==".DS_Store") {continue;}
const files = fs
.readdirSync(`./interactions/context-menus/${folder}`)
.filter((file) => file.endsWith(".js"));
for (const file of files) {
if (folder==".DS_Store") {continue;}
const menu = require(`./interactions/context-menus/${folder}/${file}`);
const keyName = `${folder.toUpperCase()} ${menu.data.name}`;
client.contextCommands.set(keyName, menu);
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,11 @@
"resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
"version" "1.0.0"

"fsevents@~2.3.1":
"integrity" "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="
"resolved" "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz"
"version" "2.3.2"

"function-bind@^1.1.1":
"integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
"resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
Expand Down

0 comments on commit 3e117e8

Please sign in to comment.