Skip to content

Commit

Permalink
♻️ Fix code smells (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-rw authored Sep 3, 2023
1 parent bf1acb1 commit 36ba514
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiscordModule } from '@discord-nestjs/core';

import { Logger, Module, OnModuleInit } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { ConfigModule } from '@nestjs/config';
import { EventEmitterModule } from '@nestjs/event-emitter';
import { ScheduleModule } from '@nestjs/schedule';

Expand Down
6 changes: 1 addition & 5 deletions src/commands/playlist/playlist.command.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { CollectorInterceptor, SlashCommandPipe } from '@discord-nestjs/common';
import {
AppliedCollectors,
Command,
Handler,
IA,
Expand All @@ -13,11 +12,9 @@ import { Injectable, Logger, UseInterceptors } from '@nestjs/common';
import {
ActionRowBuilder,
ButtonBuilder,
ButtonInteraction,
ButtonStyle,
CommandInteraction,
EmbedBuilder,
InteractionCollector,
InteractionReplyOptions,
InteractionUpdateOptions,
} from 'discord.js';
Expand All @@ -33,10 +30,10 @@ import {

import { Interval } from '@nestjs/schedule';
import { lightFormat } from 'date-fns';
import { defaultMemberPermissions } from 'src/utils/environment';
import { PlaylistInteractionCollector } from './playlist.interaction-collector';
import { PlaylistCommandParams } from './playlist.params';
import { PlaylistTempCommandData } from './playlist.types';
import { defaultMemberPermissions } from 'src/utils/environment';

@Injectable()
@Command({
Expand All @@ -59,7 +56,6 @@ export class PlaylistCommand {
async handler(
@InteractionEvent(SlashCommandPipe) dto: PlaylistCommandParams,
@IA() interaction: CommandInteraction,
@AppliedCollectors(0) collector: InteractionCollector<ButtonInteraction>,
): Promise<void> {
const page = dto.page ?? 0;

Expand Down
1 change: 1 addition & 0 deletions src/models/search/SearchHint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class SearchHint {
return `🎵 ${this.name}`;
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
async toTracks(searchService: JellyfinSearchService): Promise<Track[]> {
return [new Track(this.id, this.name, this.runtimeInMilliseconds, {})];
}
Expand Down
2 changes: 1 addition & 1 deletion src/models/shared/Playlist.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EventEmitter2, OnEvent } from '@nestjs/event-emitter';
import { EventEmitter2 } from '@nestjs/event-emitter';

import { Track } from './Track';

Expand Down

0 comments on commit 36ba514

Please sign in to comment.