Fix all lint errors (#909)

Co-authored-by: Max Isom <codetheweb@users.noreply.github.com>
This commit is contained in:
Federico Rapetti 2023-03-04 22:40:26 +01:00 committed by GitHub
parent 02ee8aefc8
commit 02611f2ae1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 11 deletions

View file

@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Fixed ### Fixed
- Fixed all lint errors
- Create the guild settings when not found instead of returning an error - Create the guild settings when not found instead of returning an error
- Add temporary workaround to avoid VoiceConnection being stuck in signalling state - Add temporary workaround to avoid VoiceConnection being stuck in signalling state

View file

@ -23,9 +23,7 @@ export default class {
private readonly commandsByName!: Collection<string, Command>; private readonly commandsByName!: Collection<string, Command>;
private readonly commandsByButtonId!: Collection<string, Command>; private readonly commandsByButtonId!: Collection<string, Command>;
constructor( constructor(@inject(TYPES.Client) client: Client, @inject(TYPES.Config) config: Config) {
@inject(TYPES.Client) client: Client,
@inject(TYPES.Config) config: Config) {
this.client = client; this.client = client;
this.config = config; this.config = config;
this.shouldRegisterCommandsOnBot = config.REGISTER_COMMANDS_ON_BOT; this.shouldRegisterCommandsOnBot = config.REGISTER_COMMANDS_ON_BOT;

View file

@ -1,5 +1,6 @@
/* eslint-disable complexity */ /* eslint-disable complexity */
import {ChatInputCommandInteraction, GuildMember} from 'discord.js'; import {ChatInputCommandInteraction, GuildMember} from 'discord.js';
import {URL} from 'node:url';
import {inject, injectable} from 'inversify'; import {inject, injectable} from 'inversify';
import shuffle from 'array-shuffle'; import shuffle from 'array-shuffle';
import {TYPES} from '../types.js'; import {TYPES} from '../types.js';

View file

@ -1,6 +1,6 @@
import {inject, injectable} from 'inversify'; import {inject, injectable} from 'inversify';
import * as spotifyURI from 'spotify-uri'; import * as spotifyURI from 'spotify-uri';
import {SongMetadata, QueuedPlaylist, MediaSource} from '../services/player.js'; import {SongMetadata, QueuedPlaylist, MediaSource} from './player';
import {TYPES} from '../types.js'; import {TYPES} from '../types.js';
import ffmpeg from 'fluent-ffmpeg'; import ffmpeg from 'fluent-ffmpeg';
import YoutubeAPI from './youtube-api.js'; import YoutubeAPI from './youtube-api.js';
@ -11,9 +11,7 @@ export default class {
private readonly youtubeAPI: YoutubeAPI; private readonly youtubeAPI: YoutubeAPI;
private readonly spotifyAPI: SpotifyAPI; private readonly spotifyAPI: SpotifyAPI;
constructor( constructor(@inject(TYPES.Services.YoutubeAPI) youtubeAPI: YoutubeAPI, @inject(TYPES.Services.SpotifyAPI) spotifyAPI: SpotifyAPI) {
@inject(TYPES.Services.YoutubeAPI) youtubeAPI: YoutubeAPI,
@inject(TYPES.Services.SpotifyAPI) spotifyAPI: SpotifyAPI) {
this.youtubeAPI = youtubeAPI; this.youtubeAPI = youtubeAPI;
this.spotifyAPI = spotifyAPI; this.spotifyAPI = spotifyAPI;
} }

View file

@ -29,10 +29,7 @@ export default class {
private readonly ytsrQueue: PQueue; private readonly ytsrQueue: PQueue;
constructor( constructor(@inject(TYPES.ThirdParty) thirdParty: ThirdParty, @inject(TYPES.Config) config: Config, @inject(TYPES.KeyValueCache) cache: KeyValueCacheProvider) {
@inject(TYPES.ThirdParty) thirdParty: ThirdParty,
@inject(TYPES.Config) config: Config,
@inject(TYPES.KeyValueCache) cache: KeyValueCacheProvider) {
this.youtube = thirdParty.youtube; this.youtube = thirdParty.youtube;
this.youtubeKey = config.YOUTUBE_API_KEY; this.youtubeKey = config.YOUTUBE_API_KEY;
this.cache = cache; this.cache = cache;