Skip to content

Commit

Permalink
package update
Browse files Browse the repository at this point in the history
  • Loading branch information
UltraInstinct0x committed Mar 2, 2024
1 parent fbdf269 commit a759ece
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Binary file modified .DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"mongoose": "6.8.0",
"ms": "^2.1.3",
"node-fetch": "^2.6.6",
"nodejs": "^18.0",
"parse-ms": "^2.1.0",
"popcat-wrapper": "^1.5.4",
"sourcebin": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion replit.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ pkgs }: {
deps = [
pkgs.ffmpeg.bin
pkgs.nodejs-18_x
pkgs.nodejs-16_x
pkgs.nodePackages.typescript-language-server
pkgs.yarn
pkgs.replitPackages.jest
Expand Down
11 changes: 8 additions & 3 deletions src/bot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const Discord = require('discord.js');
const fs = require('fs');
const path = require('path');

const { Manager } = require("erela.js");
const Spotify = require("erela.js-spotify");
Expand Down Expand Up @@ -148,9 +149,13 @@ const warnLogs = new Discord.WebhookClient({

// Load handlers
fs.readdirSync('./src/handlers').forEach((dir) => {
fs.readdirSync(`./src/handlers/${dir}`).forEach((handler) => {
require(`./handlers/${dir}/${handler}`)(client);
});
const dirPath = path.join('./src/handlers', dir);
// Check if the path is a directory
if (fs.statSync(dirPath).isDirectory()) {
fs.readdirSync(dirPath).forEach((handler) => {
require(`./handlers/${dir}/${handler}`)(client);
});
}
});

client.login(process.env.DISCORD_TOKEN);
Expand Down

0 comments on commit a759ece

Please sign in to comment.