Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions vencord-userplugin/spotifyLyricsStatus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const DEFAULT_SETTINGS = {
maxStatusLength: 128,
fontStyle: "normal",
showWaitingDots: true,
statusEmoji: "🎵",
loadingText: "loading lyrics...",
noLyricsText: "no synced lyrics",
pausedPrefix: "Pause - ",
Expand All @@ -32,7 +33,7 @@ const DEFAULT_SETTINGS = {
rpcShowAlbumArt: true
} as const;

const RELEASE_VERSION = "1.0.5";
const RELEASE_VERSION = "1.0.6";
const REPO = "MallyDev2/DiscordLyrics";
const LATEST_RELEASE_API = `https://api.github.com/repos/${REPO}/releases/latest`;
const LAST_UPDATE_CHECK_KEY = "DiscordLyrics.lastUpdateCheck";
Expand Down Expand Up @@ -571,6 +572,11 @@ const settings = definePluginSettings({
default: option.value === DEFAULT_SETTINGS.fontStyle
}))
},
statusEmoji: {
type: OptionType.STRING,
description: "The emoji to display in your status.",
default: DEFAULT_SETTINGS.statusEmoji
},
showWaitingDots: {
type: OptionType.BOOLEAN,
description: "Show dots during intros and long lyric gaps.",
Expand Down Expand Up @@ -864,6 +870,7 @@ function setProfileStatus(text: string) {
name: "Custom Status",
state: status,
type: ActivityType.CUSTOM_STATUS,
emoji: { name: settings.store.statusEmoji, id: null, animated: false },
flags: ActivityFlags.INSTANCE,
created_at: Date.now()
} satisfies Activity : null,
Expand Down Expand Up @@ -923,7 +930,11 @@ async function flushRemoteStatus() {
if (!customStatus) throw new Error("status.customStatus setting was not found");

if (status !== lastRemoteStatusText) {
await customStatus.updateSetting(status ? { text: status } : undefined);
await customStatus.updateSetting(status ? {
text: status,
emojiName: settings.store.statusEmoji,
emojiId: null
} : undefined);
}

const expiresAtMs = getStatusSetting("statusExpiresAtMs");
Expand Down