Skip to content

Commit

Permalink
Use custom heart in love command
Browse files Browse the repository at this point in the history
  • Loading branch information
abbyfour committed Nov 3, 2024
1 parent 88c4deb commit fa975f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/commands/Lastfm/Love.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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}`;
}
}

0 comments on commit fa975f7

Please sign in to comment.