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