From 105dd3570e1d2ac466864eba93e08bb905b9c056 Mon Sep 17 00:00:00 2001 From: Aaron Sandoval <89826250+aarons124@users.noreply.github.com> Date: Mon, 15 Jan 2024 20:07:48 -0700 Subject: [PATCH] style(): fixed formatting issues --- package.json | 2 +- src/events/player/playerFinish.ts | 4 +--- src/events/player/playerStart.ts | 4 ++-- src/interactions/commands/player/play.ts | 2 +- src/types/eventTypes.d.ts | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 198c2b1..940838d 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "deploy": "node ./dist/utils/deploySlashCommands.js", "predev": "npx prisma generate && npx prisma db push", "dev": "concurrently --names \"TSC,TOC,BOT\" --prefix-colors \"yellow,blue,green\" \"npx tsc -w\" \"nodemon -w locales/en -x npm run toc\" \"nodemon -x npm run start\"", - "eslint": "eslint ./src", + "eslint": "eslint ./src --fix", "prebuild": "npm run toc", "build": "tsc", "toc": "i18next-resources-for-ts interface -i ./locales/en -o ./locales/resources.d.ts", diff --git a/src/events/player/playerFinish.ts b/src/events/player/playerFinish.ts index 75a6791..8aa8769 100644 --- a/src/events/player/playerFinish.ts +++ b/src/events/player/playerFinish.ts @@ -1,11 +1,9 @@ import { ExtendedGuildQueuePlayerNode } from '../../types/eventTypes'; -import { EmbedOptions } from '../../types/configTypes'; import { randomUUID as uuidv4 } from 'node:crypto'; import loggerModule from '../../services/logger'; import { Track } from 'discord-player'; import { Snowflake } from 'discord.js'; import { Logger } from 'pino'; -import config from 'config'; // Emitted when the audio player finish playing a track. module.exports = { @@ -38,4 +36,4 @@ module.exports = { logger.debug('playerFinish event: Previous now-playing message deleted.'); } -}; \ No newline at end of file +}; diff --git a/src/events/player/playerStart.ts b/src/events/player/playerStart.ts index 8a1f89e..5c55f0e 100644 --- a/src/events/player/playerStart.ts +++ b/src/events/player/playerStart.ts @@ -63,10 +63,10 @@ module.exports = { queue.metadata.lastMessage = announceMessage; } } catch (error) { - logger.error(error, `playerStart event: Error trying to send now-playing message.`); + logger.error(error, 'playerStart event: Error trying to send now-playing message.'); return; } logger.debug('playerStart event: now-playing message sent.'); } -}; \ No newline at end of file +}; diff --git a/src/interactions/commands/player/play.ts b/src/interactions/commands/player/play.ts index 6769ffb..457bdaa 100644 --- a/src/interactions/commands/player/play.ts +++ b/src/interactions/commands/player/play.ts @@ -190,7 +190,7 @@ class PlayCommand extends BaseSlashCommandInteraction { embedFooter = this.getDisplayFooterTrackPosition(posistionFirstTrackInPlaylist, translator); } } else if (queue.currentTrack === track && queue.tracks.data.length === 0) { - if (!this.embedOptions.behavior.enablePlayerStartMessages) { + if (!this.embedOptions.behavior.enablePlayerStartMessages) { message = translator('musicPlayerCommon.nowPlayingTitle', { icon: this.embedOptions.icons.audioStartedPlaying diff --git a/src/types/eventTypes.d.ts b/src/types/eventTypes.d.ts index 2ca5512..3dee0a1 100644 --- a/src/types/eventTypes.d.ts +++ b/src/types/eventTypes.d.ts @@ -14,4 +14,4 @@ export type ExtendedGuildQueuePlayerNode = { channel: BaseGuildTextChannel; lastMessage: Message; }; -} & GuildQueuePlayerNode; \ No newline at end of file +} & GuildQueuePlayerNode;