From 046215889d93eed36427cb4e056484e386b6d5e3 Mon Sep 17 00:00:00 2001 From: Sai Teja Madha <42540377+saiteja-madha@users.noreply.github.com> Date: Fri, 9 Dec 2022 19:54:55 -0700 Subject: [PATCH] typos and styling --- src/commands/music/lyric.js | 96 ++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/src/commands/music/lyric.js b/src/commands/music/lyric.js index 0b6ad1eb4..cc9d3744d 100644 --- a/src/commands/music/lyric.js +++ b/src/commands/music/lyric.js @@ -8,59 +8,59 @@ const BASE_URL = "https://some-random-api.ml/lyrics"; * @type {import("@structures/Command")} */ module.exports = { - name: "lyric", - description: "find lyric of the song", - category: "MUSIC", - botPermissions: ["EmbedLinks"], - command: { - enabled: true, - minArgsCount: 1, - usage: "", - }, - slashCommand: { - enabled: true, - options: [ - { - name: "query", - type: ApplicationCommandOptionType.String, - description: "find lyric of the song", - required: true, - }, - ], - }, + name: "lyric", + description: "find lyric of the song", + category: "MUSIC", + botPermissions: ["EmbedLinks"], + command: { + enabled: true, + minArgsCount: 1, + usage: "", + }, + slashCommand: { + enabled: true, + options: [ + { + name: "query", + type: ApplicationCommandOptionType.String, + description: "find lyric of the song", + required: true, + }, + ], + }, - async messageRun(message, args) { - const choise = args.join(" "); - if (!choise) { - return message.safeReply("Invalid Lyric selected."); - } - const response = await getLyric(message.author, choise); - return message.safeReply(response); - }, + async messageRun(message, args) { + const choice = args.join(" "); + if(!choice) { + return message.safeReply("Invalid Lyric selected."); + } + const response = await getLyric(message.author, choice); + return message.safeReply(response); + }, - async interactionRun(interaction) { - const choise = interaction.options.getString("query"); - const response = await getLyric(interaction.user, choise); - await interaction.followUp(response); - }, + async interactionRun(interaction) { + const choice = interaction.options.getString("query"); + const response = await getLyric(interaction.user, choice); + await interaction.followUp(response) + }, }; -async function getLyric(user, choise) { - const lyric = await getJson(`${BASE_URL}?title=${choise}`); - if (!lyric.success) return MESSAGES.API_ERROR; +async function getLyric(user, choice) { + const lyric = await getJson(`${BASE_URL}?title=${choice}`); + if(!lyric.success) return MESSAGES.API_ERROR; - const thumbnail = lyric.data?.thumbnail.genius; - const author = lyric.data?.author; - const lyrics = lyric.data?.lyrics; - const title = lyric.data?.title; + const thumbnail = lyric.data?.thumbnail.genius; + const author = lyric.data?.author; + const lyrics = lyric.data?.lyrics; + const title = lyric.data?.title; - const embed = new EmbedBuilder(); - embed - .setColor(EMBED_COLORS.BOT_EMBED) - .setTitle(`${author} - ${title}`) - .setThumbnail(thumbnail) - .setDescription(lyrics) - .setFooter({ text: `Request By: ${user.tag}` }); + const embed = new EmbedBuilder(); + embed + .setColor(EMBED_COLORS.BOT_EMBED) + .setTitle(`${author} - ${title}`) + .setThumbnail(thumbnail) + .setDescription(lyrics) + .setFooter({ text: `Request By: ${user.tag}` }); - return { embeds: [embed] }; + return { embeds: [embed] }; }