Merge branch 'dev' of https://github.com/Vendicated/Vencord into discord-types

This commit is contained in:
ryan-0324 2024-09-03 10:44:19 -04:00
parent 4a4e7f7456
commit a2dee2782b
3 changed files with 33 additions and 11 deletions

View file

@ -7,6 +7,7 @@
import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import { type Emoji, EmojiType } from "@vencord/discord-types";
const settings = definePluginSettings({
shownEmojis: {
@ -35,8 +36,8 @@ export default definePlugin({
}
}
],
shouldSkip(guildId: string, emoji: any) {
if (emoji.type !== "GUILD_EMOJI") {
shouldSkip(guildId: string, emoji: Emoji) {
if (emoji.type !== EmojiType.GUILD) {
return false;
}
if (settings.store.shownEmojis === "onlyUnicode") {

View file

@ -4,21 +4,38 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
import definePlugin, { OptionType } from "@utils/types";
const settings = definePluginSettings({
onlySnow: {
type: OptionType.BOOLEAN,
description: "Only play the Snow Halation Theme",
default: false,
restartNeeded: true
}
});
// 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],
authors: [Devs.AndrewDLO, Devs.FieryFlames, Devs.RamziAH],
settings,
patches: [
{
find: '"call_ringing_beat"',
replacement: {
replacement: [
{
match: /500!==\i\(\)\.random\(1,1e3\)/,
replace: "false",
}
replace: "false"
},
],
{
predicate: () => settings.store.onlySnow,
match: /"call_ringing_beat",/,
replace: ""
}
]
}
]
});

View file

@ -566,6 +566,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
name: "niko",
id: 341377368075796483n,
},
RamziAH: {
name: "RamziAH",
id: 1279957227612147747n,
},
} satisfies Record<string, Dev>);
// iife so #__PURE__ works correctly