diff --git a/src/equicordplugins/equicordToolbox/index.tsx b/src/equicordplugins/equicordToolbox/index.tsx index 1f3937dad..84b8c6884 100644 --- a/src/equicordplugins/equicordToolbox/index.tsx +++ b/src/equicordplugins/equicordToolbox/index.tsx @@ -152,9 +152,10 @@ export default definePlugin({ patches: [ { - find: '"TITLEBAR_FAST_TRAVEL"', + find: '?"BACK_FORWARD_NAVIGATION":', replacement: { - match: /focusSectionProps:"HELP".{0,20},className:(\i)\}\),/, + // TODO: (?:\.button) is for stable compat and should be removed soon:tm: + match: /focusSectionProps:"HELP".{0,20},className:(\i(?:\.button)?)\}\),/, replace: "$& $self.renderVencordPopoutButton($1)," } } diff --git a/src/plugins/experiments/index.tsx b/src/plugins/experiments/index.tsx index b3cd27bdb..242ce8a8b 100644 --- a/src/plugins/experiments/index.tsx +++ b/src/plugins/experiments/index.tsx @@ -68,7 +68,7 @@ export default definePlugin({ }, // Change top right chat toolbar button from the help one to the dev one { - find: '"TITLEBAR_FAST_TRAVEL"', + find: '?"BACK_FORWARD_NAVIGATION":', replacement: { match: /hasBugReporterAccess:(\i)/, replace: "_hasBugReporterAccess:$1=true" diff --git a/src/plugins/noReplyMention/index.tsx b/src/plugins/noReplyMention/index.tsx index 4af78ee29..28bfc2566 100644 --- a/src/plugins/noReplyMention/index.tsx +++ b/src/plugins/noReplyMention/index.tsx @@ -20,6 +20,7 @@ import { definePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; import type { Message } from "@vencord/discord-types"; +import { ChannelStore, GuildMemberStore } from "@webpack/common"; const settings = definePluginSettings({ userList: { @@ -28,16 +29,22 @@ const settings = definePluginSettings({ type: OptionType.STRING, default: "1234567890123445,1234567890123445", }, + roleList: { + description: + "List of roles to allow or exempt pings for (separated by commas or spaces)", + type: OptionType.STRING, + default: "1234567890123445,1234567890123445", + }, shouldPingListed: { description: "Behaviour", type: OptionType.SELECT, options: [ { - label: "Do not ping the listed users", + label: "Do not ping the listed users / roles", value: false, }, { - label: "Only ping the listed users", + label: "Only ping the listed users / roles", value: true, default: true, }, @@ -57,7 +64,14 @@ export default definePlugin({ settings, shouldMention(message: Message, isHoldingShift: boolean) { - const isListed = settings.store.userList.includes(message.author.id); + let isListed = settings.store.userList.includes(message.author.id); + + const channel = ChannelStore.getChannel(message.channel_id); + if (channel?.guild_id && !isListed) { + const roles = GuildMemberStore.getMember(channel.guild_id, message.author.id)?.roles; + isListed = !!roles && roles.some(role => settings.store.roleList.includes(role)); + } + const isExempt = settings.store.shouldPingListed ? isListed : !isListed; return settings.store.inverseShiftReply ? isHoldingShift !== isExempt : !isHoldingShift && isExempt; }, diff --git a/src/plugins/reverseImageSearch/index.tsx b/src/plugins/reverseImageSearch/index.tsx index a2e7b7e66..3c1a5402d 100644 --- a/src/plugins/reverseImageSearch/index.tsx +++ b/src/plugins/reverseImageSearch/index.tsx @@ -28,6 +28,7 @@ const Engines = { Yandex: "https://yandex.com/images/search?rpt=imageview&url=", SauceNAO: "https://saucenao.com/search.php?url=", IQDB: "https://iqdb.org/?url=", + Bing: "https://www.bing.com/images/search?view=detailv2&iss=sbi&q=imgurl:", TinEye: "https://www.tineye.com/search?url=", ImgOps: "https://imgops.com/start?url=" } as const;