From b4732f17f4a951e1d8052b45a49deff06c208c45 Mon Sep 17 00:00:00 2001 From: hwangsihu Date: Mon, 21 Oct 2024 18:40:35 +0900 Subject: [PATCH] Format --- src/commands/music/Lyrics.ts | 19 +++++++---- src/utils/genius-lyrics-api.d.ts | 58 ++++++++++++++++---------------- 2 files changed, 42 insertions(+), 35 deletions(-) diff --git a/src/commands/music/Lyrics.ts b/src/commands/music/Lyrics.ts index ea6ad68af..b258fb40b 100644 --- a/src/commands/music/Lyrics.ts +++ b/src/commands/music/Lyrics.ts @@ -1,4 +1,11 @@ -import { ActionRowBuilder, ButtonBuilder, type ButtonInteraction, ButtonStyle, ComponentType, type TextChannel, } from 'discord.js'; +import { + ActionRowBuilder, + ButtonBuilder, + type ButtonInteraction, + ButtonStyle, + ComponentType, + type TextChannel, +} from 'discord.js'; import { getLyrics } from 'genius-lyrics-api'; import { Command, type Context, type Lavamusic } from '../../structures/index'; @@ -7,9 +14,9 @@ export default class Lyrics extends Command { super(client, { name: 'lyrics', description: { - content: 'cmd.lyrics.description', - examples: ['lyrics'], - usage: 'lyrics', + content: 'cmd.lyrics.description', + examples: ['lyrics'], + usage: 'lyrics', }, category: 'music', aliases: ['ly'], @@ -33,8 +40,8 @@ export default class Lyrics extends Command { } public async run(client: Lavamusic, ctx: Context): Promise { - let player = client.manager.getPlayer(ctx.guild!.id); - if (!player) return await ctx.sendMessage(ctx.locale('event.message.no_music_playing')) + const player = client.manager.getPlayer(ctx.guild!.id); + if (!player) return await ctx.sendMessage(ctx.locale('event.message.no_music_playing')); const embed = this.client.embed(); const track = player.queue.current!; diff --git a/src/utils/genius-lyrics-api.d.ts b/src/utils/genius-lyrics-api.d.ts index 177debc18..9b56c3595 100644 --- a/src/utils/genius-lyrics-api.d.ts +++ b/src/utils/genius-lyrics-api.d.ts @@ -1,36 +1,36 @@ declare module 'genius-lyrics-api' { - interface SearchOptions { - apiKey: string; - title: string; - artist?: string; - optimizeQuery?: boolean; - } + interface SearchOptions { + apiKey: string; + title: string; + artist?: string; + optimizeQuery?: boolean; + } - interface Song { - id: number; - title: string; - url: string; - } + interface Song { + id: number; + title: string; + url: string; + } - interface LyricsOptions { - title: string; - artist: string; - } + interface LyricsOptions { + title: string; + artist: string; + } - interface AlbumArtOptions { - title: string; - artist: string; - } + interface AlbumArtOptions { + title: string; + artist: string; + } - interface SongByIdOptions { - id: number; - apiKey: string; - } + interface SongByIdOptions { + id: number; + apiKey: string; + } - export function search(options: SearchOptions): Promise; - export function getSong(options: { id: number; apiKey: string }): Promise; - export function getLyrics(options: LyricsOptions): Promise; - export function getAlbumArt(options: AlbumArtOptions): Promise; - export function getSongById(options: SongByIdOptions): Promise; - export function searchSong(options: SearchOptions): Promise; + export function search(options: SearchOptions): Promise; + export function getSong(options: { id: number; apiKey: string }): Promise; + export function getLyrics(options: LyricsOptions): Promise; + export function getAlbumArt(options: AlbumArtOptions): Promise; + export function getSongById(options: SongByIdOptions): Promise; + export function searchSong(options: SearchOptions): Promise; }