🚨 Fix compiler errors

This commit is contained in:
Manuel 2023-02-19 12:57:44 +01:00
parent 7a085e70cf
commit 6c75861c49
12 changed files with 5358 additions and 17130 deletions

9305
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,9 @@
import { TransformPipe } from '@discord-nestjs/common';
import { Command, DiscordCommand } from '@discord-nestjs/core';
import { Injectable } from '@nestjs/common/decorators';
import { Command, DiscordCommand, UsePipes } from '@discord-nestjs/core';
import { CommandInteraction } from 'discord.js';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
import { DiscordVoiceService } from '../clients/discord/discord.voice.service';
@ -9,7 +11,7 @@ import { DiscordVoiceService } from '../clients/discord/discord.voice.service';
name: 'disconnect',
description: 'Join your current voice channel',
})
@UsePipes(TransformPipe)
@Injectable()
export class DisconnectCommand implements DiscordCommand {
constructor(
private readonly discordVoiceService: DiscordVoiceService,

View File

@ -1,14 +1,16 @@
import { TransformPipe } from '@discord-nestjs/common';
import { Command, DiscordCommand } from '@discord-nestjs/core';
import { Injectable } from '@nestjs/common';
import { Command, DiscordCommand, UsePipes } from '@discord-nestjs/core';
import { CommandInteraction } from 'discord.js';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
@Command({
name: 'help',
description: 'Get help if you're having problems with this bot',
})
@UsePipes(TransformPipe)
@Injectable()
export class HelpCommand implements DiscordCommand {
constructor(private readonly discordMessageService: DiscordMessageService) {}

View File

@ -1,15 +1,17 @@
import { TransformPipe } from '@discord-nestjs/common';
import { Command, DiscordCommand } from '@discord-nestjs/core';
import { Injectable } from '@nestjs/common';
import { Command, DiscordCommand, UsePipes } from '@discord-nestjs/core';
import { CommandInteraction } from 'discord.js';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
import { PlaybackService } from '../playback/playback.service';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
@Command({
name: 'next',
description: 'Go to the next track in the playlist',
})
@UsePipes(TransformPipe)
@Injectable()
export class SkipTrackCommand implements DiscordCommand {
constructor(
private readonly playbackService: PlaybackService,

View File

@ -1,7 +1,9 @@
import { TransformPipe } from '@discord-nestjs/common';
import { Command, DiscordCommand } from '@discord-nestjs/core';
import { Injectable } from '@nestjs/common';
import { CommandInteraction } from 'discord.js';
import { Command, DiscordCommand, UsePipes } from '@discord-nestjs/core';
import { CommandInteraction, InteractionReplyOptions } from 'discord.js';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
import { DiscordVoiceService } from '../clients/discord/discord.voice.service';
@ -9,7 +11,7 @@ import { DiscordVoiceService } from '../clients/discord/discord.voice.service';
name: 'pause',
description: 'Pause or resume the playback of the current track',
})
@UsePipes(TransformPipe)
@Injectable()
export class PausePlaybackCommand implements DiscordCommand {
constructor(
private readonly discordVoiceService: DiscordVoiceService,

View File

@ -1,16 +1,15 @@
import { TransformPipe } from '@discord-nestjs/common';
import {
Command,
DiscordTransformedCommand,
On,
Payload,
TransformedCommandExecutionContext,
UsePipes,
} from '@discord-nestjs/core';
import { RemoteImageResult } from '@jellyfin/sdk/lib/generated-client/models';
import { Logger } from '@nestjs/common/services';
import { Injectable } from '@nestjs/common';
import {
ComponentType,
@ -37,7 +36,7 @@ import { trimStringToFixedLength } from '../utils/stringUtils/stringUtils';
name: 'play',
description: 'Search for an item on your Jellyfin instance',
})
@UsePipes(TransformPipe)
@Injectable()
export class PlayItemCommand
implements DiscordTransformedCommand<TrackRequestDto>
{

View File

@ -1,19 +1,21 @@
import { TransformPipe } from '@discord-nestjs/common';
import { Command, DiscordCommand } from '@discord-nestjs/core';
import { Injectable } from '@nestjs/common';
import { Command, DiscordCommand, UsePipes } from '@discord-nestjs/core';
import { CommandInteraction } from 'discord.js';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
import { PlaybackService } from '../playback/playback.service';
import { Constants } from '../utils/constants';
import { formatMillisecondsAsHumanReadable } from '../utils/timeUtils';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
import { chooseSuitableRemoteImageFromTrack } from '../utils/remoteImages/remoteImages';
import { trimStringToFixedLength } from '../utils/stringUtils/stringUtils';
import { formatMillisecondsAsHumanReadable } from '../utils/timeUtils';
@Command({
name: 'playlist',
description: 'Print the current track information',
})
@UsePipes(TransformPipe)
@Injectable()
export class PlaylistCommand implements DiscordCommand {
constructor(
private readonly discordMessageService: DiscordMessageService,

View File

@ -1,15 +1,17 @@
import { TransformPipe } from '@discord-nestjs/common';
import { Command, DiscordCommand } from '@discord-nestjs/core';
import { Injectable } from '@nestjs/common/decorators';
import { Command, DiscordCommand, UsePipes } from '@discord-nestjs/core';
import { CommandInteraction } from 'discord.js';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
import { PlaybackService } from '../playback/playback.service';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
@Command({
name: 'previous',
description: 'Go to the previous track',
})
@UsePipes(TransformPipe)
@Injectable()
export class PreviousTrackCommand implements DiscordCommand {
constructor(
private readonly playbackService: PlaybackService,

View File

@ -1,25 +1,26 @@
import { TransformPipe } from '@discord-nestjs/common';
import {
Command,
DiscordCommand,
InjectDiscordClient,
UsePipes,
} from '@discord-nestjs/core';
import { getSystemApi } from '@jellyfin/sdk/lib/utils/api/system-api';
import { Injectable } from '@nestjs/common';
import { Client, CommandInteraction, Status } from 'discord.js';
import { formatDuration, intervalToDuration } from 'date-fns';
import { Constants } from '../utils/constants';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
import { JellyfinService } from '../clients/jellyfin/jellyfin.service';
import { Constants } from '../utils/constants';
import { getSystemApi } from '@jellyfin/sdk/lib/utils/api/system-api';
@Command({
name: 'status',
description: 'Display the current status for troubleshooting',
})
@UsePipes(TransformPipe)
@Injectable()
export class StatusCommand implements DiscordCommand {
constructor(
@InjectDiscordClient()

View File

@ -1,16 +1,18 @@
import { TransformPipe } from '@discord-nestjs/common';
import { Command, DiscordCommand } from '@discord-nestjs/core';
import { Injectable } from '@nestjs/common';
import { Command, DiscordCommand, UsePipes } from '@discord-nestjs/core';
import { CommandInteraction } from 'discord.js';
import { PlaybackService } from '../playback/playback.service';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
import { DiscordVoiceService } from '../clients/discord/discord.voice.service';
import { PlaybackService } from '../playback/playback.service';
@Command({
name: 'stop',
description: 'Stop playback entirely and clear the current playlist',
})
@UsePipes(TransformPipe)
@Injectable()
export class StopPlaybackCommand implements DiscordCommand {
constructor(
private readonly playbackService: PlaybackService,

View File

@ -1,8 +1,9 @@
import { TransformPipe } from '@discord-nestjs/common';
import { Command, DiscordCommand } from '@discord-nestjs/core';
import { Injectable, Logger } from '@nestjs/common';
import { Command, DiscordCommand, UsePipes } from '@discord-nestjs/core';
import { Logger } from '@nestjs/common';
import { CommandInteraction, GuildMember } from 'discord.js';
import { DiscordMessageService } from '../clients/discord/discord.message.service';
import { DiscordVoiceService } from '../clients/discord/discord.voice.service';
@ -10,7 +11,7 @@ import { DiscordVoiceService } from '../clients/discord/discord.voice.service';
name: 'summon',
description: 'Join your current voice channel',
})
@UsePipes(TransformPipe)
@Injectable()
export class SummonCommand implements DiscordCommand {
private readonly logger = new Logger(SummonCommand.name);

13086
yarn.lock

File diff suppressed because it is too large Load Diff