Skip to content

Fix replacements for Discord verison stable 562538 (6acb41e)#24

Open
0limpik wants to merge 1 commit into
ScattrdBlade:mainfrom
0limpik:fix-replacements-2026-06-14
Open

Fix replacements for Discord verison stable 562538 (6acb41e)#24
0limpik wants to merge 1 commit into
ScattrdBlade:mainfrom
0limpik:fix-replacements-2026-06-14

Conversation

@0limpik

@0limpik 0limpik commented Jun 14, 2026

Copy link
Copy Markdown

Should close #23

Console output and new code Error for "new Audio" replacement:
Logger.ts:40  Vencord   PluginManager  Starting plugin CustomSounds
Logger.ts:40  Vencord   WebpackPatcher  Patch by CustomSounds had no effect (Module id is 946261): /(let \i=class.{0,900}?new Audio;\i.src=)((\i\(\d+\))(?:\(`\.\/\$\{|.{0,50}concat\())this.name((?:\}\.mp3`|,".mp3"\))\))/
_log @ Logger.ts:40
Logger.ts:40  Vencord   WebpackPatcher  Undoing patch group could not play audio by CustomSounds because replacement /(let \i=class.{0,900}?new Audio;\i.src=)((\i\(\d+\))(?:\(`\.\/\$\{|.{0,50}concat\())this.name((?:\}\.mp3`|,".mp3"\))\))/ had no effect
_log @ Logger.ts:40

Error for "buildPlayer" replacement:

Logger.ts:40  Vencord   PluginManager  Starting plugin CustomSounds
Logger.ts:40  Vencord   WebpackPatcher  Patch by CustomSounds errored (Module id is 946261): /(?<=constructor\((\i,\i,\i,\i)).{0,200}outputChannel=\i/
 SyntaxError: Unexpected token ','
    at eval (<anonymous>)
    at IS (patchWebpack.ts:600:38)
    at Object.apply (patchWebpack.ts:263:32)
    at A (web.7a8cf81b22dd8f50.js:217:1418286)
    at 400492 (web.7a8cf81b22dd8f50.js:148:20607)
    at bS (patchWebpack.ts:418:40)
    at Object.apply (patchWebpack.ts:264:16)
    at A (web.7a8cf81b22dd8f50.js:217:1418286)
    at 827343 (web.7a8cf81b22dd8f50.js:12:2078369)
    at bS (patchWebpack.ts:418:40)
_log @ Logger.ts:40
Logger.ts:40  Vencord   WebpackPatcher  Undoing patch group could not play audio by CustomSounds because replacement /(?<=constructor\((\i,\i,\i,\i)).{0,200}outputChannel=\i/ errored
_log @ Logger.ts:40

New code from Discord:

let T = class {
	name;
	_volume;
	_audio;
	outputChannel;
	trackNotificationFailure;
	constructor(e, t, n, i, r=!1) {
			this.name = e,
			this._volume = n,
			this.outputChannel = i,
			this.trackNotificationFailure = r
	}
	get volume() {
			return this._volume
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No sound being replaced

1 participant