mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-23 02:01:57 +01:00
🚨 Fix EsLint errors
This commit is contained in:
parent
4cf961f2df
commit
46aa88e9b3
@ -21,5 +21,6 @@ module.exports = {
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'linebreak-style': 0,
|
||||
},
|
||||
};
|
||||
|
@ -17,6 +17,7 @@ export class DisconnectCommand implements DiscordCommand {
|
||||
private readonly discordMessageService: DiscordMessageService,
|
||||
) {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
handler(interaction: CommandInteraction): GenericCustomReply {
|
||||
const disconnect = this.discordVoiceService.disconnect();
|
||||
|
||||
|
@ -13,6 +13,7 @@ import { GenericCustomReply } from '../models/generic-try-handler';
|
||||
export class HelpCommand implements DiscordCommand {
|
||||
constructor(private readonly discordMessageService: DiscordMessageService) {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
handler(commandInteraction: CommandInteraction): GenericCustomReply {
|
||||
return {
|
||||
embeds: [
|
||||
|
@ -17,6 +17,7 @@ export class SkipTrackCommand implements DiscordCommand {
|
||||
) {}
|
||||
|
||||
handler(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
interactionCommand: CommandInteraction,
|
||||
): InteractionReplyOptions | string {
|
||||
if (!this.playbackService.nextTrack()) {
|
||||
|
@ -17,6 +17,7 @@ export class PausePlaybackCommand implements DiscordCommand {
|
||||
) {}
|
||||
|
||||
handler(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
commandInteraction: CommandInteraction,
|
||||
): string | InteractionReplyOptions {
|
||||
const shouldBePaused = this.discordVoiceService.togglePaused();
|
||||
|
@ -49,6 +49,7 @@ export class PlayItemCommand
|
||||
|
||||
async handler(
|
||||
@Payload() dto: TrackRequestDto,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
executionContext: TransformedCommandExecutionContext<any>,
|
||||
): Promise<InteractionReplyOptions | string> {
|
||||
const items = await this.jellyfinSearchService.search(dto.search);
|
||||
|
@ -20,6 +20,7 @@ export class PlaylistCommand implements DiscordCommand {
|
||||
private readonly playbackService: PlaybackService,
|
||||
) {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
handler(interaction: CommandInteraction): GenericCustomReply {
|
||||
const playList = this.playbackService.getPlaylist();
|
||||
|
||||
|
@ -17,6 +17,7 @@ export class PreviousTrackCommand implements DiscordCommand {
|
||||
) {}
|
||||
|
||||
handler(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
dcommandInteraction: CommandInteraction,
|
||||
): InteractionReplyOptions | string {
|
||||
if (!this.playbackService.previousTrack()) {
|
||||
|
@ -4,13 +4,13 @@ import {
|
||||
Command,
|
||||
DiscordCommand,
|
||||
InjectDiscordClient,
|
||||
UsePipes
|
||||
UsePipes,
|
||||
} from '@discord-nestjs/core';
|
||||
import {
|
||||
Client,
|
||||
CommandInteraction,
|
||||
InteractionReplyOptions,
|
||||
Status
|
||||
Status,
|
||||
} from 'discord.js';
|
||||
|
||||
import { formatDuration, intervalToDuration } from 'date-fns';
|
||||
@ -34,6 +34,7 @@ export class StatusCommand implements DiscordCommand {
|
||||
) {}
|
||||
|
||||
async handler(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
commandInteraction: CommandInteraction,
|
||||
): Promise<string | InteractionReplyOptions> {
|
||||
const ping = this.client.ws.ping;
|
||||
|
@ -18,6 +18,7 @@ export class StopPlaybackCommand implements DiscordCommand {
|
||||
private readonly discordMessageService: DiscordMessageService,
|
||||
private readonly discordVoiceService: DiscordVoiceService,
|
||||
) {}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
handler(CommandInteraction: CommandInteraction): GenericCustomReply {
|
||||
this.playbackService.clear();
|
||||
this.discordVoiceService.stop(false);
|
||||
|
@ -2,7 +2,6 @@ import {
|
||||
Catch,
|
||||
DiscordArgumentMetadata,
|
||||
DiscordExceptionFilter,
|
||||
On,
|
||||
} from '@discord-nestjs/core';
|
||||
import { Logger } from '@nestjs/common';
|
||||
import {
|
||||
@ -10,9 +9,6 @@ import {
|
||||
ButtonBuilder,
|
||||
ButtonStyle,
|
||||
CommandInteraction,
|
||||
ComponentBuilder,
|
||||
Events,
|
||||
Interaction,
|
||||
} from 'discord.js';
|
||||
import { DiscordMessageService } from '../clients/discord/discord.message.service';
|
||||
import { Constants } from '../utils/constants';
|
||||
|
@ -7,7 +7,6 @@ import { Track } from '../types/track';
|
||||
import { trimStringToFixedLength } from '../utils/stringUtils';
|
||||
|
||||
import { Logger } from '@nestjs/common';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { JellyfinSearchService } from '../clients/jellyfin/jellyfin.search.service';
|
||||
|
||||
export interface BaseJellyfinAudioPlayable {
|
||||
|
@ -62,7 +62,7 @@ export class UpdatesService {
|
||||
const isoDate = parseISO(latestVersion.published_at);
|
||||
const relativeReadable = formatRelative(isoDate, new Date());
|
||||
|
||||
guilds.forEach(async (guild, key) => {
|
||||
guilds.forEach(async (guild) => {
|
||||
const owner = await guild.fetchOwner();
|
||||
|
||||
await owner.send({
|
||||
|
Loading…
Reference in New Issue
Block a user