From 348261b1e858a6badd8632999d77b77dad159849 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Tue, 12 Aug 2025 20:02:25 -0400 Subject: [PATCH 1/6] MusicControls: Migrate Settings --- src/equicordplugins/musicControls/index.tsx | 10 ++++++- .../musicControls/settings.tsx | 26 ++----------------- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/src/equicordplugins/musicControls/index.tsx b/src/equicordplugins/musicControls/index.tsx index 09c299c44..0031aeb0d 100644 --- a/src/equicordplugins/musicControls/index.tsx +++ b/src/equicordplugins/musicControls/index.tsx @@ -102,7 +102,15 @@ export default definePlugin({ }, async start() { + if (Settings.plugins?.SpotifyControls?.enabled) { + settings.store.showSpotifyControls = true; + Settings.plugins.SpotifyControls.enabled = false; + } + if (Settings.plugins?.SpotifyLyrics?.enabled) { + settings.store.showSpotifyLyrics = true; + Settings.plugins.SpotifyLyrics.enabled = false; + } await migrateOldLyrics(); - toggleHoverControls(Settings.plugins.MusicControls.hoverControls); + toggleHoverControls(settings.store.hoverControls); }, }); diff --git a/src/equicordplugins/musicControls/settings.tsx b/src/equicordplugins/musicControls/settings.tsx index 5d62d84f3..8e9c4eac0 100644 --- a/src/equicordplugins/musicControls/settings.tsx +++ b/src/equicordplugins/musicControls/settings.tsx @@ -6,13 +6,11 @@ import { definePluginSettings } from "@api/Settings"; import { disableStyle, enableStyle } from "@api/Styles"; -import { useAwaiter } from "@utils/react"; import { makeRange, OptionType } from "@utils/types"; -import { Button, Forms, MaskedLink, showToast, Text, Toasts, useMemo } from "@webpack/common"; +import { Button, Forms, MaskedLink, showToast, Toasts } from "@webpack/common"; import hoverOnlyStyle from "./hoverOnly.css?managed"; -import { clearLyricsCache, getLyricsCount } from "./spotify/lyrics/api"; -import { useLyrics } from "./spotify/lyrics/components/util"; +import { clearLyricsCache } from "./spotify/lyrics/api"; import { Provider } from "./spotify/lyrics/providers/types"; const sliderOptions = { @@ -24,26 +22,6 @@ export function toggleHoverControls(value: boolean) { (value ? enableStyle : disableStyle)(hoverOnlyStyle); } -function Details() { - const { lyricsInfo } = useLyrics(); - - const [count, error, loading] = useAwaiter( - useMemo(() => getLyricsCount, []), - { - onError: () => console.error("Failed to get lyrics count"), - fallbackValue: null, - } - ); - - return ( - <> - Current lyrics provider: {lyricsInfo?.useLyric || "None"} - {loading ? Loading lyrics count... : error ? Failed to get lyrics count : Lyrics count: {count}} - - ); -} - - function InstallInstructions() { return ( From 57a1140a0b53f5929a51c7d08908d7f933bf454a Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Tue, 12 Aug 2025 20:17:55 -0400 Subject: [PATCH 2/6] MusicControls: Tags --- src/equicordplugins/musicControls/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/equicordplugins/musicControls/index.tsx b/src/equicordplugins/musicControls/index.tsx index 0031aeb0d..4d206c529 100644 --- a/src/equicordplugins/musicControls/index.tsx +++ b/src/equicordplugins/musicControls/index.tsx @@ -33,6 +33,7 @@ import { TidalPlayer } from "./tidal/TidalPlayer"; export default definePlugin({ name: "MusicControls", description: "Music Controls and Lyrics for multiple services ", + tags: ["Spotify", "SpotifyControls", "SpotifyLyrics"], authors: [Devs.Ven, Devs.afn, Devs.KraXen72, Devs.Av32000, Devs.nin0dev, EquicordDevs.thororen, EquicordDevs.vmohammad, Devs.Joona], settings, patches: [ From e6a89e146e0c0a20c828042d933c4b7081cd649e Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Tue, 12 Aug 2025 20:36:05 -0400 Subject: [PATCH 3/6] MusicControls: Updated Tags --- src/equicordplugins/musicControls/index.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/equicordplugins/musicControls/index.tsx b/src/equicordplugins/musicControls/index.tsx index 4d206c529..319abe21d 100644 --- a/src/equicordplugins/musicControls/index.tsx +++ b/src/equicordplugins/musicControls/index.tsx @@ -30,12 +30,29 @@ import { SpotifyPlayer } from "./spotify/PlayerComponent"; import { TidalLyrics } from "./tidal/lyrics/components/lyrics"; import { TidalPlayer } from "./tidal/TidalPlayer"; +const tags = [ + // Spotify + "Spotify", + "SpotifyControls", + "SpotifyLyrics", + // Tidal + "Tidal", + "TidalControls", + "TidalLyrics", + // Youtube + /* Deprecated RN + "Youtube", + "YoutubeMusic", + "YoutubeMusicControls" + */ +]; + export default definePlugin({ name: "MusicControls", description: "Music Controls and Lyrics for multiple services ", - tags: ["Spotify", "SpotifyControls", "SpotifyLyrics"], authors: [Devs.Ven, Devs.afn, Devs.KraXen72, Devs.Av32000, Devs.nin0dev, EquicordDevs.thororen, EquicordDevs.vmohammad, Devs.Joona], settings, + tags, patches: [ { find: "this.isCopiedStreakGodlike", From 9a27e47a8ab3ac16c7a9f9083f712d6e4c41e92b Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Tue, 12 Aug 2025 23:32:17 -0400 Subject: [PATCH 4/6] Fix Lint --- src/equicordplugins/musicControls/index.tsx | 35 ++++++++++----------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/equicordplugins/musicControls/index.tsx b/src/equicordplugins/musicControls/index.tsx index 319abe21d..db1801eb2 100644 --- a/src/equicordplugins/musicControls/index.tsx +++ b/src/equicordplugins/musicControls/index.tsx @@ -30,29 +30,28 @@ import { SpotifyPlayer } from "./spotify/PlayerComponent"; import { TidalLyrics } from "./tidal/lyrics/components/lyrics"; import { TidalPlayer } from "./tidal/TidalPlayer"; -const tags = [ - // Spotify - "Spotify", - "SpotifyControls", - "SpotifyLyrics", - // Tidal - "Tidal", - "TidalControls", - "TidalLyrics", - // Youtube - /* Deprecated RN - "Youtube", - "YoutubeMusic", - "YoutubeMusicControls" - */ -]; - export default definePlugin({ name: "MusicControls", description: "Music Controls and Lyrics for multiple services ", authors: [Devs.Ven, Devs.afn, Devs.KraXen72, Devs.Av32000, Devs.nin0dev, EquicordDevs.thororen, EquicordDevs.vmohammad, Devs.Joona], settings, - tags, + tags: [ + // Spotify + "Spotify", + "SpotifyControls", + "SpotifyLyrics", + // Tidal + "Tidal", + "TidalControls", + "TidalLyrics", + // Youtube + /* Deprecated RN + "Youtube", + "YoutubeMusic", + "YoutubeMusicControls" + */ + ], + patches: [ { find: "this.isCopiedStreakGodlike", From aad88fe9cd5cafd34691e487f39acd4d215d74ed Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 13 Aug 2025 12:55:24 +0200 Subject: [PATCH 5/6] fix plugins sending messages --- src/api/MessageEvents.ts | 10 +++++----- src/utils/discord.tsx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/api/MessageEvents.ts b/src/api/MessageEvents.ts index 8b1d9e782..6e752c90c 100644 --- a/src/api/MessageEvents.ts +++ b/src/api/MessageEvents.ts @@ -62,7 +62,7 @@ export interface MessageReplyOptions { }; } -export interface MessageExtra { +export interface MessageOptions { stickers?: string[]; uploads?: Upload[]; replyOptions: MessageReplyOptions; @@ -72,17 +72,17 @@ export interface MessageExtra { openWarningPopout: (props: any) => any; } -export type MessageSendListener = (channelId: string, messageObj: MessageObject, extra: MessageExtra) => Promisable; +export type MessageSendListener = (channelId: string, messageObj: MessageObject, options: MessageOptions) => Promisable; export type MessageEditListener = (channelId: string, messageId: string, messageObj: MessageObject) => Promisable; const sendListeners = new Set(); const editListeners = new Set(); -export async function _handlePreSend(channelId: string, messageObj: MessageObject, extra: MessageExtra, replyOptions: MessageReplyOptions) { - extra.replyOptions = replyOptions; +export async function _handlePreSend(channelId: string, messageObj: MessageObject, options: MessageOptions, replyOptions: MessageReplyOptions) { + options.replyOptions = replyOptions; for (const listener of sendListeners) { try { - const result = await listener(channelId, messageObj, extra); + const result = await listener(channelId, messageObj, options); if (result?.cancel) { return true; } diff --git a/src/utils/discord.tsx b/src/utils/discord.tsx index d7a38ebb0..f236943b1 100644 --- a/src/utils/discord.tsx +++ b/src/utils/discord.tsx @@ -110,7 +110,7 @@ export function insertTextIntoChatInputBox(text: string) { }); } -interface MessageExtra { +interface MessageOptions { messageReference: Message["messageReference"]; allowedMentions: { parse: string[]; @@ -122,8 +122,8 @@ interface MessageExtra { export function sendMessage( channelId: string, data: Partial, - waitForChannelReady?: boolean, - extra?: Partial + waitForChannelReady = true, + options: Partial = {} ) { const messageData = { content: "", @@ -133,7 +133,7 @@ export function sendMessage( ...data }; - return MessageActions.sendMessage(channelId, messageData, waitForChannelReady, extra); + return MessageActions.sendMessage(channelId, messageData, waitForChannelReady, options); } /** From f356f647ff90d1abed69dc47c05e641a94dde7a5 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 13 Aug 2025 12:58:29 +0200 Subject: [PATCH 6/6] bump to v1.12.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5438d37f7..498b8919f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vencord", "private": "true", - "version": "1.12.9", + "version": "1.12.10", "description": "The cutest Discord client mod", "homepage": "https://github.com/Vendicated/Vencord#readme", "bugs": {