Skip to content

Commit 4f0a3b1

Browse files
committed
Fix plugins
1 parent 40ec089 commit 4f0a3b1

9 files changed

Lines changed: 25 additions & 24 deletions

File tree

ActivityToggle/src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ActivityToggle",
33
"author": "Neodymium",
4-
"version": "1.2.29",
4+
"version": "1.2.30",
55
"description": "Adds a button to quickly toggle Activity Status.",
66
"source": "https://github.com/Neodymium7/BetterDiscordStuff/blob/main/ActivityToggle/ActivityToggle.plugin.js",
77
"invite": "fRbsqH87Av"

ActivityToggle/src/modules.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ export const playSound = expectModule<(sound: string, volume: number) => void>({
1919
});
2020

2121
export const ShowCurrentGame = expectModule({
22-
filter: (m) => m.G6?.useSetting,
22+
filter: (m) => m.tz?.useSetting,
2323
name: "ShowCurrentGame",
2424
fallback: {
25-
G6: {
25+
tz: {
2626
useSetting: () => React.useState(true),
2727
updateSetting: undefined as ((...args: any) => void) | undefined,
2828
},
2929
},
30-
})?.G6;
30+
})?.tz;
3131

3232
export const Account = expectModule<React.ComponentClass>({
3333
filter: Webpack.Filters.byPrototypeKeys("renderNameZone"),

AvatarSettingsButton/src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "AvatarSettingsButton",
33
"author": "Neodymium",
4-
"version": "2.3.1",
4+
"version": "2.3.2",
55
"description": "Moves the User Settings button to left clicking on the user avatar, with the status picker and context menu still available on configurable actions.",
66
"source": "https://github.com/Neodymium7/BetterDiscordStuff/blob/main/AvatarSettingsButton/AvatarSettingsButton.plugin.js",
77
"invite": "fRbsqH87Av",

PinnedMessageIcons/src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "PinnedMessageIcons",
33
"author": "Neodymium",
4-
"version": "2.0.4",
4+
"version": "2.0.5",
55
"description": "Displays an icon on and optionally adds a background to pinned messages.",
66
"source": "https://github.com/Neodymium7/BetterDiscordStuff/blob/main/PinnedMessageIcons/PinnedMessageIcons.plugin.js",
77
"invite": "fRbsqH87Av"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "TypingUsersPopouts",
33
"author": "Neodymium",
4-
"version": "1.4.10",
4+
"version": "1.4.11",
55
"description": "Opens the user's popout when clicking on a name in the typing area.",
66
"source": "https://github.com/Neodymium7/BetterDiscordStuff/blob/main/TypingUsersPopouts/TypingUsersPopouts.plugin.js",
77
"invite": "fRbsqH87Av",
88
"changelog": [
99
{
1010
"title": "Fixed",
1111
"type": "fixed",
12-
"items": ["Fixed crashing."]
12+
"items": ["Fixed minor styling issues."]
1313
}
1414
]
1515
}

VoiceActivity/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class VoiceActivity implements Plugin {
3737

3838
patchMemberListItem() {
3939
if (!MemberListItem) return;
40-
Patcher.after(...MemberListItem, (_, [props], ret) => {
40+
Patcher.after(MemberListItem, "type", (_, [props], ret) => {
4141
if (!props.user) return ret;
4242
const children = ret.props.children;
4343

VoiceActivity/src/manifest.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
{
22
"name": "VoiceActivity",
33
"author": "Neodymium",
4-
"version": "1.12.0",
4+
"version": "1.12.1",
55
"description": "Shows icons and info in popouts, the member list, and more when someone is in a voice channel.",
66
"source": "https://github.com/Neodymium7/BetterDiscordStuff/blob/main/VoiceActivity/VoiceActivity.plugin.js",
77
"invite": "fRbsqH87Av",
88
"changelog": [
99
{
10-
"title": "Changed",
11-
"type": "improved",
12-
"items": [
13-
"Removed user profile section and related options. (Discord now has a native voice channel activity card, and also displays multiple activities in popouts!)",
14-
"This plugin still corrects some of the native profile behavior, including displaying the voice channel info everywhere in the app, instead of only in relevant servers."
15-
]
10+
"title": "Fixed",
11+
"type": "fixed",
12+
"items": ["Fixed member list icons."]
1613
}
1714
]
1815
}

VoiceActivity/src/modules/discordmodules.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ export function useUserVoiceStateFallback({ userId }: { userId: string; guildId?
2727
} else return {};
2828
}
2929

30-
export const MemberListItem = expectWithKey<AnyComponent>({
31-
filter: Webpack.Filters.byStrings("memberInner", "renderPopout"),
30+
export const MemberListItem = expectModule<React.MemoExoticComponent<AnyComponent>>({
31+
filter: (m) => m.type?.toString?.().includes("MemberListItem"),
3232
name: "MemberListItem",
33+
searchExports: true,
3334
});
3435

3536
export const PrivateChannel = expectWithKey<AnyComponent>({

common/lib/utils/webpack.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export function getSelectors<T extends string>(...classes: T[]): { [key in T]: s
3030

3131
if (!module) return undefined;
3232

33-
return Object.keys(module).reduce((obj, key) => {
34-
obj[key] = "." + module[key as T].replaceAll(" ", ".");
33+
return classes.reduce((obj, className) => {
34+
obj[className] = "." + module[className].replaceAll(" ", ".");
3535
return obj;
3636
}, {} as any);
3737
}
@@ -139,10 +139,13 @@ export function expectWithKey<T>(options: ExpectModuleOptions<T>): WithKeyResult
139139
export function expectClasses<T extends string>(name: string, classes: T[]) {
140140
return expect(getClasses(...classes), {
141141
name,
142-
fallback: classes.reduce((obj, key) => {
143-
obj[key] = "unknown-class";
144-
return obj;
145-
}, {} as { [key in T]: string }),
142+
fallback: classes.reduce(
143+
(obj, key) => {
144+
obj[key] = "unknown-class";
145+
return obj;
146+
},
147+
{} as { [key in T]: string }
148+
),
146149
});
147150
}
148151

0 commit comments

Comments
 (0)