From fa975f72f053a546566ec33cd4a96ad8b879ce37 Mon Sep 17 00:00:00 2001 From: John Ivison Date: Sun, 3 Nov 2024 03:30:17 -0800 Subject: [PATCH] Use custom heart in love command --- src/commands/Lastfm/Love.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/Lastfm/Love.ts b/src/commands/Lastfm/Love.ts index 4d68ed8d..ab1bc7cb 100644 --- a/src/commands/Lastfm/Love.ts +++ b/src/commands/Lastfm/Love.ts @@ -6,6 +6,7 @@ import { Variation } from "../../lib/command/Command"; import { prefabArguments } from "../../lib/context/arguments/prefabArguments"; import { ArgumentsMap } from "../../lib/context/arguments/types"; import { Emoji } from "../../lib/emoji/Emoji"; +import { SettingsService } from "../../lib/settings/SettingsService"; import { LastFMArgumentsMutableContext } from "../../services/LastFM/LastFMArguments"; import { TrackInfoParams, @@ -48,6 +49,7 @@ In the meantime, it will appear in your \`!fm\`s as a loved track.`; arguments = args; + settingsService = ServiceRegistry.get(SettingsService); lovedTrackService = ServiceRegistry.get(LovedTrackService); async run() { @@ -199,7 +201,9 @@ by ${bold(trackInfo?.artist.name || artist)}${ ? `Track already not loved! ${Emoji.mendingHeart}` : `Unloved! ${Emoji.brokenHeart}` : !wasAlreadyLoved - ? `Loved! ${Emoji.heart}` + ? `Loved! ${this.settingsService.get("fmLovedEmoji", { + userID: this.author.id, + })}` : `Track already loved! ${Emoji.revolvingHearts}`; } }