1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-26 17:26:22 +00:00
Vencord/src/plugins/secretRingTone/index.ts

26 lines
867 B
TypeScript
Raw Normal View History

/*
* Vencord, a Discord client mod
* Copyright (c) 2023 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
// NOTE - Ultimately should probably be turned into a ringtone picker plugin
export default definePlugin({
name: "SecretRingToneEnabler",
description: "Always play the secret version of the discord ringtone (except during special ringtone events)",
authors: [Devs.AndrewDLO, Devs.FieryFlames],
patches: [
{
2024-05-03 22:07:43 +00:00
find: '"call_ringing_beat"',
replacement: {
2024-05-03 22:07:43 +00:00
// FIXME Remove === alternative when it hits stable
match: /500(!==|===)\i\(\)\.random\(1,1e3\)/,
replace: (_, predicate) => predicate === "!==" ? "false" : "true",
}
},
],
});