mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-25 02:51:57 +01:00
🚨 Fix deepsource warnings
This commit is contained in:
parent
f033790420
commit
128cf2fd3d
@ -9,7 +9,6 @@ import {
|
|||||||
joinVoiceChannel,
|
joinVoiceChannel,
|
||||||
NoSubscriberBehavior,
|
NoSubscriberBehavior,
|
||||||
VoiceConnection,
|
VoiceConnection,
|
||||||
VoiceConnectionStatus,
|
|
||||||
} from '@discordjs/voice';
|
} from '@discordjs/voice';
|
||||||
|
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
@ -18,11 +17,11 @@ import { EventEmitter2, OnEvent } from '@nestjs/event-emitter';
|
|||||||
|
|
||||||
import { GuildMember } from 'discord.js';
|
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 { JellyfinStreamBuilderService } from '../jellyfin/jellyfin.stream.builder.service';
|
||||||
import { JellyfinWebSocketService } from '../jellyfin/jellyfin.websocket.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';
|
import { DiscordMessageService } from './discord.message.service';
|
||||||
|
|
||||||
@ -93,7 +92,7 @@ export class DiscordVoiceService {
|
|||||||
|
|
||||||
this.jellyfinWebSocketService.initializeAndConnect();
|
this.jellyfinWebSocketService.initializeAndConnect();
|
||||||
|
|
||||||
if (this.voiceConnection == undefined) {
|
if (this.voiceConnection === undefined) {
|
||||||
this.voiceConnection = getVoiceConnection(member.guild.id);
|
this.voiceConnection = getVoiceConnection(member.guild.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
PlaystateCommand,
|
PlaystateCommand,
|
||||||
SessionMessageType,
|
SessionMessageType,
|
||||||
UserItemDataDto,
|
|
||||||
} from '@jellyfin/sdk/lib/generated-client/models';
|
} from '@jellyfin/sdk/lib/generated-client/models';
|
||||||
|
|
||||||
import { Injectable, Logger, OnModuleDestroy } from '@nestjs/common';
|
import { Injectable, Logger, OnModuleDestroy } from '@nestjs/common';
|
||||||
import { EventEmitter2 } from '@nestjs/event-emitter';
|
import { EventEmitter2 } from '@nestjs/event-emitter';
|
||||||
import { Cron } from '@nestjs/schedule';
|
import { Cron } from '@nestjs/schedule';
|
||||||
import { Session } from 'inspector';
|
|
||||||
|
|
||||||
import { WebSocket } from 'ws';
|
import { WebSocket } from 'ws';
|
||||||
|
|
||||||
|
@ -20,14 +20,14 @@ import {
|
|||||||
InteractionReplyOptions,
|
InteractionReplyOptions,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
|
|
||||||
import { PlaybackService } from '../../playback/playback.service';
|
|
||||||
import { formatMillisecondsAsHumanReadable } from '../../utils/timeUtils';
|
|
||||||
import { DiscordMessageService } from '../../clients/discord/discord.message.service';
|
import { DiscordMessageService } from '../../clients/discord/discord.message.service';
|
||||||
import { DiscordVoiceService } from '../../clients/discord/discord.voice.service';
|
import { DiscordVoiceService } from '../../clients/discord/discord.voice.service';
|
||||||
import { JellyfinSearchService } from '../../clients/jellyfin/jellyfin.search.service';
|
import { JellyfinSearchService } from '../../clients/jellyfin/jellyfin.search.service';
|
||||||
import { SearchHint } from '../../models/search/SearchHint';
|
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()
|
@Injectable()
|
||||||
@Command({
|
@Command({
|
||||||
@ -105,8 +105,8 @@ export class PlayItemCommand {
|
|||||||
this.playbackService.getPlaylistOrDefault().enqueueTracks(tracks);
|
this.playbackService.getPlaylistOrDefault().enqueueTracks(tracks);
|
||||||
|
|
||||||
const remoteImage: RemoteImageInfo | undefined = tracks
|
const remoteImage: RemoteImageInfo | undefined = tracks
|
||||||
.flatMap((x) => x.getRemoteImages())
|
.flatMap((track) => track.getRemoteImages())
|
||||||
.find((x) => true);
|
.find(() => true);
|
||||||
|
|
||||||
await interaction.followUp({
|
await interaction.followUp({
|
||||||
embeds: [
|
embeds: [
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { EventEmitter2, OnEvent } from '@nestjs/event-emitter';
|
import { EventEmitter2 } from '@nestjs/event-emitter';
|
||||||
|
|
||||||
import { Track } from './Track';
|
import { Track } from './Track';
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ describe('UpdatesService', () => {
|
|||||||
} as DiscordMessageService;
|
} as DiscordMessageService;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (token === Client || token == '__inject_discord_client__') {
|
if (token === Client || token === '__inject_discord_client__') {
|
||||||
return {
|
return {
|
||||||
guilds: {
|
guilds: {
|
||||||
cache: [
|
cache: [
|
||||||
|
Loading…
Reference in New Issue
Block a user