🚨 Fix deepsource warnings

This commit is contained in:
Manuel 2023-04-01 13:27:02 +02:00 committed by Manuel
parent f033790420
commit 128cf2fd3d
5 changed files with 11 additions and 14 deletions

View File

@ -9,7 +9,6 @@ import {
joinVoiceChannel,
NoSubscriberBehavior,
VoiceConnection,
VoiceConnectionStatus,
} from '@discordjs/voice';
import { Injectable } from '@nestjs/common';
@ -18,11 +17,11 @@ import { EventEmitter2, OnEvent } from '@nestjs/event-emitter';
import { GuildMember } from 'discord.js';
import { GenericTryHandler } from '../../models/generic-try-handler';
import { Track } from '../../models/shared/Track';
import { PlaybackService } from '../../playback/playback.service';
import { JellyfinStreamBuilderService } from '../jellyfin/jellyfin.stream.builder.service';
import { JellyfinWebSocketService } from '../jellyfin/jellyfin.websocket.service';
import { GenericTryHandler } from '../../models/generic-try-handler';
import { PlaybackService } from '../../playback/playback.service';
import { Track } from '../../models/shared/Track';
import { DiscordMessageService } from './discord.message.service';
@ -93,7 +92,7 @@ export class DiscordVoiceService {
this.jellyfinWebSocketService.initializeAndConnect();
if (this.voiceConnection == undefined) {
if (this.voiceConnection === undefined) {
this.voiceConnection = getVoiceConnection(member.guild.id);
}

View File

@ -1,13 +1,11 @@
import {
PlaystateCommand,
SessionMessageType,
UserItemDataDto,
} from '@jellyfin/sdk/lib/generated-client/models';
import { Injectable, Logger, OnModuleDestroy } from '@nestjs/common';
import { EventEmitter2 } from '@nestjs/event-emitter';
import { Cron } from '@nestjs/schedule';
import { Session } from 'inspector';
import { WebSocket } from 'ws';

View File

@ -20,14 +20,14 @@ import {
InteractionReplyOptions,
} from 'discord.js';
import { PlaybackService } from '../../playback/playback.service';
import { formatMillisecondsAsHumanReadable } from '../../utils/timeUtils';
import { DiscordMessageService } from '../../clients/discord/discord.message.service';
import { DiscordVoiceService } from '../../clients/discord/discord.voice.service';
import { JellyfinSearchService } from '../../clients/jellyfin/jellyfin.search.service';
import { SearchHint } from '../../models/search/SearchHint';
import { PlaybackService } from '../../playback/playback.service';
import { formatMillisecondsAsHumanReadable } from '../../utils/timeUtils';
import { SearchType, PlayCommandParams } from './play.params.ts';
import { PlayCommandParams, SearchType } from './play.params.ts';
@Injectable()
@Command({
@ -105,8 +105,8 @@ export class PlayItemCommand {
this.playbackService.getPlaylistOrDefault().enqueueTracks(tracks);
const remoteImage: RemoteImageInfo | undefined = tracks
.flatMap((x) => x.getRemoteImages())
.find((x) => true);
.flatMap((track) => track.getRemoteImages())
.find(() => true);
await interaction.followUp({
embeds: [

View File

@ -1,4 +1,4 @@
import { EventEmitter2, OnEvent } from '@nestjs/event-emitter';
import { EventEmitter2 } from '@nestjs/event-emitter';
import { Track } from './Track';

View File

@ -33,7 +33,7 @@ describe('UpdatesService', () => {
} as DiscordMessageService;
}
if (token === Client || token == '__inject_discord_client__') {
if (token === Client || token === '__inject_discord_client__') {
return {
guilds: {
cache: [