diff --git a/src/commands/Lastfm/Friends/Help.ts b/src/commands/Lastfm/Friends/Help.ts index 52d33b2c..62c8baa4 100644 --- a/src/commands/Lastfm/Friends/Help.ts +++ b/src/commands/Lastfm/Friends/Help.ts @@ -4,7 +4,7 @@ import { FriendsChildCommand } from "./FriendsChildCommand"; export class Help extends FriendsChildCommand { idSeed = "csr yeham"; - description = "View help about the fishy minigame"; + description = "View help about managing friends"; usage = [""]; slashCommand = true; diff --git a/src/commands/Lastfm/NowPlaying/Config/Help.ts b/src/commands/Lastfm/NowPlaying/Config/Help.ts index d45d7849..e30eef21 100644 --- a/src/commands/Lastfm/NowPlaying/Config/Help.ts +++ b/src/commands/Lastfm/NowPlaying/Config/Help.ts @@ -27,7 +27,10 @@ nowplaying config allows you to customize which elements appear in the footer of \`${this.prefix}npc add \` - Quickly add some options \`${this.prefix}npc remove \` - Quickly remove some options -You can also use \`${this.prefix}reacts\` to control nowplaying reactions +You can also use \`${this.prefix}reacts\` to control nowplaying reactions. +You can change the username display and heart emoji in user settings. (\`${ + this.prefix + }usersettings\`) **Options** ${sortConfigOptions(getComponents().map((o) => o.componentName)) diff --git a/src/lib/emoji/nativeEmojis.ts b/src/lib/emoji/nativeEmojis.ts index 3695f8c4..db6effb8 100644 --- a/src/lib/emoji/nativeEmojis.ts +++ b/src/lib/emoji/nativeEmojis.ts @@ -20,6 +20,16 @@ export const NativeEmoji = { mendingHeart: "โค๏ธโ€๐Ÿฉน", brokenHeart: "๐Ÿ’”", revolvingHearts: "๐Ÿ’ž", - heart: "โค๏ธ", sparklingHeart: "๐Ÿ’–", + heart: "โค๏ธ", + pinkheart: "๐Ÿฉท", + orangeheart: "๐Ÿงก", + yellowheart: "๐Ÿ’›", + greenheart: "๐Ÿ’š", + lightblueheart: "๐Ÿฉต", + blueheart: "๐Ÿ’™", + purpleheart: "๐Ÿ’œ", + blackheart: "๐Ÿ–ค", + whiteheart: "๐Ÿค", + brownheart: "๐ŸคŽ", } as const satisfies Record; diff --git a/src/lib/nowplaying/compoundComponents/LovedAndOwnedComponent.ts b/src/lib/nowplaying/compoundComponents/LovedAndOwnedComponent.ts index b9414092..ccb846c6 100644 --- a/src/lib/nowplaying/compoundComponents/LovedAndOwnedComponent.ts +++ b/src/lib/nowplaying/compoundComponents/LovedAndOwnedComponent.ts @@ -1,4 +1,6 @@ +import { ServiceRegistry } from "../../../services/ServicesRegistry"; import { Emoji } from "../../emoji/Emoji"; +import { SettingsService } from "../../settings/SettingsService"; import { AnyIn, BaseCompoundComponent } from "../base/BaseNowPlayingComponent"; const lovedAndOwnedDependencies = [ @@ -16,6 +18,8 @@ export class LovedAndOwnedComponent extends BaseCompoundComponent< static replaces = new AnyIn(["loved", "card-ownership"]); async render() { + const settingsService = ServiceRegistry.get(SettingsService); + const loved = this.values.trackInfo?.loved || !!this.values.cachedLovedTrack; const owned = @@ -27,7 +31,13 @@ export class LovedAndOwnedComponent extends BaseCompoundComponent< } else if (owned) { return { size: 0, string: Emoji.sparkles }; } else if (loved) { - return { size: 0, string: Emoji.heart }; + return { + size: 0, + string: + settingsService.get("fmLovedEmoji", { + userID: this.ctx.author.id, + }) || Emoji.heart, + }; } else { return { string: "", size: 0 }; } diff --git a/src/lib/settings/Settings.ts b/src/lib/settings/Settings.ts index a0b11769..5426e8ce 100644 --- a/src/lib/settings/Settings.ts +++ b/src/lib/settings/Settings.ts @@ -1,5 +1,6 @@ import { defaultPrefix } from "../../../config.json"; import { ComboService } from "../../services/dbservices/ComboService"; +import { Emoji } from "../emoji/Emoji"; import { BaseSetting, BotScopedSetting, @@ -91,6 +92,26 @@ export const Settings = { FMMode.VERBOSE, ], }), + fmLovedEmoji: new UserScopedSetting("fm_loved_emoji", { + friendlyName: "!fm loved emoji", + description: "Control what emoji Gowon shows for loved tracks in your !fms", + category: "Now Playing", + type: SettingType.Choice, + default: Emoji.heart, + choices: [ + Emoji.heart, + Emoji.pinkheart, + Emoji.orangeheart, + Emoji.yellowheart, + Emoji.greenheart, + Emoji.lightblueheart, + Emoji.blueheart, + Emoji.purpleheart, + Emoji.blackheart, + Emoji.whiteheart, + Emoji.brownheart, + ], + }), fmUsernameDisplay: new UserScopedSetting("fm_username_display", { friendlyName: "!fm username display", description: "Control what username Gowon shows in your !fms",