From 3f5ae218890e18b2f3b1e6f691a004c8257400e9 Mon Sep 17 00:00:00 2001 From: Reynard-G Date: Tue, 9 Jan 2024 18:36:39 -0600 Subject: [PATCH] fixed LF eslint --- src/commands/loop-queue.ts | 84 +++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/src/commands/loop-queue.ts b/src/commands/loop-queue.ts index 045d6b24..47b9adf7 100644 --- a/src/commands/loop-queue.ts +++ b/src/commands/loop-queue.ts @@ -1,42 +1,42 @@ -import {ChatInputCommandInteraction} from 'discord.js'; -import {TYPES} from '../types.js'; -import {inject, injectable} from 'inversify'; -import PlayerManager from '../managers/player.js'; -import Command from '.'; -import {SlashCommandBuilder} from '@discordjs/builders'; -import {STATUS} from '../services/player.js'; - -@injectable() -export default class implements Command { - public readonly slashCommand = new SlashCommandBuilder() - .setName('loop-queue') - .setDescription('toggle looping the entire queue'); - - public requiresVC = true; - - private readonly playerManager: PlayerManager; - - constructor(@inject(TYPES.Managers.Player) playerManager: PlayerManager) { - this.playerManager = playerManager; - } - - public async execute(interaction: ChatInputCommandInteraction): Promise { - const player = this.playerManager.get(interaction.guild!.id); - - if (player.status === STATUS.IDLE) { - throw new Error('no songs to loop!'); - } - - if (player.queueSize() < 2) { - throw new Error('not enough songs to loop a queue!'); - } - - if (player.loopCurrentSong) { - player.loopCurrentSong = false; - } - - player.loopCurrentQueue = !player.loopCurrentQueue; - - await interaction.reply((player.loopCurrentQueue ? 'looped queue :)' : 'stopped looping queue :(')); - } -} +import {ChatInputCommandInteraction} from 'discord.js'; +import {TYPES} from '../types.js'; +import {inject, injectable} from 'inversify'; +import PlayerManager from '../managers/player.js'; +import Command from '.'; +import {SlashCommandBuilder} from '@discordjs/builders'; +import {STATUS} from '../services/player.js'; + +@injectable() +export default class implements Command { + public readonly slashCommand = new SlashCommandBuilder() + .setName('loop-queue') + .setDescription('toggle looping the entire queue'); + + public requiresVC = true; + + private readonly playerManager: PlayerManager; + + constructor(@inject(TYPES.Managers.Player) playerManager: PlayerManager) { + this.playerManager = playerManager; + } + + public async execute(interaction: ChatInputCommandInteraction): Promise { + const player = this.playerManager.get(interaction.guild!.id); + + if (player.status === STATUS.IDLE) { + throw new Error('no songs to loop!'); + } + + if (player.queueSize() < 2) { + throw new Error('not enough songs to loop a queue!'); + } + + if (player.loopCurrentSong) { + player.loopCurrentSong = false; + } + + player.loopCurrentQueue = !player.loopCurrentQueue; + + await interaction.reply((player.loopCurrentQueue ? 'looped queue :)' : 'stopped looping queue :(')); + } +}