Skip to content

Commit 8aa49ce

Browse files
committed
Fix plugins
1 parent eb23b8f commit 8aa49ce

30 files changed

Lines changed: 1268 additions & 547 deletions

File tree

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# ContentWarning
2-
Vencord plugin for adding content warnings in the form of blurring messages that contain certain words
32

4-
5-
Support the PR! https://github.com/Vendicated/Vencord/pull/2617
3+
A Vencord plugin for adding content warnings in the form of blurring messages that contain certain words.

src/plusplugins/ContentWarning/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const settings = definePluginSettings({
133133
export default definePlugin({
134134
name: "ContentWarning",
135135
authors: [Devs.camila314],
136-
description: "Allows you to specify trigger words that will be blurred by default. Clicking on the blurred content will reveal it",
136+
description: "Allows you to specify trigger words that will be blurred by default. Hovering over the blurred content will reveal it",
137137
settings,
138138
patches: [
139139
{
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# DontFilterMe
2+
3+
Warns you if automod might flag your message.

src/plusplugins/DontFilterMe/constants.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/plusplugins/DontFilterMe/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function warningEmbedNotice(trigger) {
2323
<Forms.FormText>
2424
Your message contains a term on the automod preset list. (Term "{trigger}")
2525
</Forms.FormText>
26-
<Forms.FormText type={Forms.FormText.Types.DESCRIPTION}>
26+
<Forms.FormText>
2727
There is a high chance your message will be blocked and potentially moderated by a server moderator.
2828
</Forms.FormText>
2929
</div>,

src/plusplugins/allCallTimers/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,3 @@ Original author: [AllCallTimersDiscordPlugin](https://github.com/Max-Herbold/All
1010
<img height="346rem" alt="image" src="https://github.com/Max-Herbold/Vencord/assets/49804267/b30b7703-b8d3-4703-b70b-e6a711eb08a4">
1111
<img width="424rem" alt="image" src="https://github.com/Max-Herbold/Vencord/assets/49804267/299916e0-a05d-4b9a-b4ed-901bd39ab728">
1212
<br/>
13-
14-
Potential improvements:
15-
16-
- [ ] Add a log to each voice channel of join/leave and potentially mute/unmute events
17-
- [ ] Add a timer to each user in private voice calls
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# AlwaysExpandProfiles
2+
3+
Always expands a user's or bot's profile, skipping the popout.

src/plusplugins/alwaysExpandProfile/index.ts

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,17 @@ import definePlugin from "@utils/types";
1010
import { User } from "@vencord/discord-types";
1111

1212
export default definePlugin({
13-
name: "AlwaysExpandProfile",
14-
description: "Always display a user's full popout",
13+
name: "AlwaysExpandProfiles",
14+
description: "Always expands profile popouts to the full modal",
1515
authors: [EquicordDevs.thororen],
1616
patches: [
1717
{
18-
find: '"UserProfilePopout"})',
18+
find: '"view-profile"',
1919
replacement: {
20-
match: /(?<=user:(\i).*?"PRESS_VIEW_PROFILE".{0,150})return/,
21-
replace: "return $self.openUserProfile($1);"
22-
}
23-
},
24-
{
25-
find: '"BotUserProfilePopout"',
26-
replacement: {
27-
match: /(?<=user:(\i).*?"PRESS_VIEW_PROFILE".{0,100})return/,
28-
replace: "return $self.openUserProfile($1);"
29-
}
20+
match: /(user:(\i).*?"PRESS_VIEW_PROFILE".{0,200})return/,
21+
replace: "$1return $self.openUserProfile($2);"
22+
},
23+
all: true
3024
},
3125
],
3226
openUserProfile(user: User) {

src/plusplugins/betterActivities/index.tsx

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import "./styles.css";
88

99
import { migratePluginSettings } from "@api/Settings";
10-
import { Devs } from "@utils/constants";
10+
import { Devs, EquicordDevs } from "@utils/constants";
1111
import definePlugin from "@utils/types";
1212

1313
import { patchActivityList } from "./patch-helpers/activityList";
@@ -22,7 +22,8 @@ export default definePlugin({
2222
authors: [
2323
Devs.D3SOX,
2424
Devs.Arjix,
25-
Devs.AutumnVN
25+
Devs.AutumnVN,
26+
EquicordDevs.thororen
2627
],
2728
tags: ["activity"],
2829

@@ -36,21 +37,37 @@ export default definePlugin({
3637
{
3738
// Patch activity icons
3839
find: "isBlockedOrIgnored(null",
39-
replacement: {
40-
match: /(?<=hideTooltip:.{0,4}}=(\i).*?{}\))\]/,
41-
replace: ",$self.patchActivityList($1)]"
42-
},
43-
predicate: () => settings.store.memberList,
40+
replacement: [
41+
{
42+
match: /(?<=className:\i,children:\[).*?(?=\i\(\),\i&&)/,
43+
replace: "",
44+
predicate: () => settings.store.removeGameActivityStatus,
45+
},
46+
{
47+
match: /(?<=hideTooltip:.{0,4}}=(\i).*?{}\))\]/,
48+
replace: ",$self.patchActivityList($1)]",
49+
predicate: () => settings.store.memberList,
50+
}
51+
],
4452
all: true
4553
},
4654
{
4755
// Show all activities in the user popout/sidebar
4856
find: '"UserProfilePopoutBody"',
4957
replacement: {
50-
match: /(?<=(\i)\.id\)\}\)\),(\i).*?)\(0,.{0,100}\i\.id,onClose:\i\}\)/,
51-
replace: "$self.showAllActivitiesComponent({ activity: $2, user: $1 })"
58+
match: /((\i)=.{0,10}(\i)\.id\).*?,)\i\?.{0,250}onClose:\i\}\)/,
59+
replace: "$1$self.showAllActivitiesComponent({ activity: $2, user: $3 })"
5260
},
5361
predicate: () => settings.store.userPopout
5462
},
63+
// User Panel
64+
{
65+
find: "#{intl::STATUS_MENU_LABEL}",
66+
replacement: {
67+
match: /((\i)=.{0,10}(\i)\.id\).*?,)\i\?.{0,250}onClose:\i\}\)/,
68+
replace: "$1$self.showAllActivitiesComponent({ activity: $2, user: $3 })"
69+
},
70+
predicate: () => settings.store.userPopout
71+
}
5572
],
5673
});

src/plusplugins/betterActivities/patch-helpers/activityList.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@ const DefaultActivityIcon = findComponentByCodeLazy("M5 2a3 3 0 0 0-3 3v14a3 3 0
2222
export function patchActivityList({ activities, user, hideTooltip }: ActivityListProps): JSX.Element | null {
2323
const icons: ActivityListIcon[] = [];
2424

25-
if (user.bot || hideTooltip) return null;
25+
if (user.bot || settings.store.hideTooltip && hideTooltip) return null;
2626

2727
const applicationIcons = getApplicationIcons(activities);
2828
if (applicationIcons.length) {
2929
const compareImageSource = (a: ApplicationIcon, b: ApplicationIcon) => {
30-
return a.image.src === b.image.src;
30+
return a.image?.src === b.image?.src;
3131
};
32+
3233
const uniqueIcons = applicationIcons.filter((element, index, array) => {
3334
return array.findIndex(el => compareImageSource(el, element)) === index;
3435
});
36+
3537
for (const appIcon of uniqueIcons) {
3638
icons.push({
3739
iconElement: <img {...appIcon.image} />,

0 commit comments

Comments
 (0)