diff --git a/package.json b/package.json index 13300574c..4e1e52f61 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,7 @@ "lint": "eslint . --cache --ext .js,.jsx,.ts,.tsx", "lint:fix": "eslint . --fix --cache --ext .js,.jsx,.ts,.tsx", "format": "prettier --check .", - "format:fix": "prettier --write .", - "dev": "nodemon --watch src --exec \"ts-node src/LavaClient.ts\"" + "format:fix": "prettier --write ." }, "repository": { "type": "git", diff --git a/src/events/client/MessageCreate.ts b/src/events/client/MessageCreate.ts index 6f9424f26..0ac262a40 100644 --- a/src/events/client/MessageCreate.ts +++ b/src/events/client/MessageCreate.ts @@ -10,8 +10,6 @@ export default class MessageCreate extends Event { } public async run(message: Message): Promise { if (message.author.bot) return; - console.log(message.member.voice.channel); - const setup = await this.client.prisma.setup.findUnique({ where: { guildId: message.guildId, diff --git a/src/plugin/index.ts b/src/plugin/index.ts index 801323100..48a9dd743 100644 --- a/src/plugin/index.ts +++ b/src/plugin/index.ts @@ -1,8 +1,10 @@ import fs from 'node:fs'; import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { Lavamusic } from '../structures/index.js'; +const __dirname = path.dirname(fileURLToPath(import.meta.url)); export default function loadPlugins(client: Lavamusic): void { const pluginsFolder = path.join(__dirname, './plugins'); const pluginFiles = fs.readdirSync(pluginsFolder).filter(file => file.endsWith('.js')); diff --git a/src/structures/Lavamusic.ts b/src/structures/Lavamusic.ts index e43ee2b50..c2407b6c5 100644 --- a/src/structures/Lavamusic.ts +++ b/src/structures/Lavamusic.ts @@ -14,6 +14,7 @@ import { } from 'discord.js'; import fs from 'node:fs'; import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { Queue, ShoukakuClient } from './index.js'; import Logger from './Logger.js'; @@ -21,6 +22,7 @@ import config from '../config.js'; import loadPlugins from '../plugin/index.js'; import { Utils } from '../utils/Utils.js'; +const __dirname = path.dirname(fileURLToPath(import.meta.url)); export default class Lavamusic extends Client { public commands: Collection = new Collection(); public aliases: Collection = new Collection();