mirror of
https://github.com/System-End/Vencord.git
synced 2026-04-19 20:55:13 +00:00
fix some things broken by a recent Discord update
This commit is contained in:
parent
dc27c4da76
commit
577407bab9
6 changed files with 18 additions and 11 deletions
|
|
@ -51,11 +51,17 @@ export default definePlugin({
|
|||
// Show plugin name instead of "Built-In"
|
||||
{
|
||||
find: "#{intl::COMMANDS_OPTIONAL_COUNT}",
|
||||
replacement: {
|
||||
// ...children: p?.name
|
||||
match: /(?<=:(\i)\.displayDescription\}.{0,200}children:).{0,50}\.name(?=\}\))/,
|
||||
replace: "$1.plugin||($&)"
|
||||
}
|
||||
replacement: [
|
||||
{
|
||||
// ...children: p?.name
|
||||
match: /(?<=:(\i)\.displayDescription\}.{0,200}children:).{0,50}\.name(?=\}\))/,
|
||||
replace: "$1.plugin||($&)"
|
||||
},
|
||||
{
|
||||
match: /children:(?=\i\?\?\i\?\.name)(?<=command:(\i),.+?)/,
|
||||
replace: "children:$1.plugin??"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export default definePlugin({
|
|||
required: true,
|
||||
patches: [
|
||||
{
|
||||
find: '"Menu API',
|
||||
find: "Menu API only allows Items",
|
||||
replacement: {
|
||||
match: /function.{0,80}type===(\i\.\i)\).{0,50}navigable:.+?Menu API/s,
|
||||
replace: (m, mod) => {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default definePlugin({
|
|||
find: ".handleSendMessage,onResize:",
|
||||
replacement: {
|
||||
// https://regex101.com/r/7iswuk/1
|
||||
match: /let (\i)=\i\.\i\.parse\((\i),.+?\.getSendMessageOptions\(\{.+?\}\);(?=.+?(\i)\.flags=)(?<=\)\(({.+?})\)\.then.+?)/,
|
||||
match: /let (\i)=\i\.\i\.parse\((\i),.+?\.getSendMessageOptions\(\{.+?\}\)?;(?=.+?(\i)\.flags=)(?<=\)\(({.+?})\)\.then.+?)/,
|
||||
replace: (m, parsedMessage, channel, replyOptions, extra) => m +
|
||||
`if(await Vencord.Api.MessageEvents._handlePreSend(${channel}.id,${parsedMessage},${extra},${replyOptions}))` +
|
||||
"return{shouldClear:false,shouldRefocus:true};"
|
||||
|
|
|
|||
|
|
@ -106,10 +106,10 @@ export default definePlugin({
|
|||
},
|
||||
// Enable experiment embed on sent experiment links
|
||||
{
|
||||
find: '"Clear Treatment "',
|
||||
find: "Clear Treatment ",
|
||||
replacement: [
|
||||
{
|
||||
match: /\i\.isStaff\(\)/,
|
||||
match: /\i\??\.isStaff\(\)/,
|
||||
replace: "true"
|
||||
},
|
||||
// Fix some tricky experiments name causing a client crash
|
||||
|
|
|
|||
|
|
@ -101,7 +101,8 @@ interface Modals {
|
|||
}>;
|
||||
}
|
||||
|
||||
export const Modals: Modals = mapMangledModuleLazy(':"thin")', {
|
||||
// TODO: move to new modal api
|
||||
export const Modals: Modals = mapMangledModuleLazy(".MODAL_ROOT_LEGACY,", {
|
||||
ModalRoot: filters.componentByCode('.MODAL,"aria-labelledby":'),
|
||||
ModalHeader: filters.componentByCode(",id:"),
|
||||
ModalContent: filters.componentByCode("scrollbarType:"),
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export const TextInput = waitForComponent<t.TextInput>("TextInput", filters.comp
|
|||
export const TextArea = waitForComponent<t.TextArea>("TextArea", filters.componentByCode("this.getPaddingRight()},id:"));
|
||||
export const Select = waitForComponent<t.Select>("Select", filters.componentByCode('"Select"'));
|
||||
export const SearchableSelect = waitForComponent<t.SearchableSelect>("SearchableSelect", filters.componentByCode('"SearchableSelect"'));
|
||||
export const Slider = waitForComponent<t.Slider>("Slider", filters.componentByCode('"markDash".concat('));
|
||||
export const Slider = waitForComponent<t.Slider>("Slider", filters.componentByCode("markDash", "this.renderMark("));
|
||||
export const Popout = waitForComponent<t.Popout>("Popout", filters.componentByCode("ref:this.ref,", "renderPopout:this.renderPopout,"));
|
||||
export const Dialog = waitForComponent<t.Dialog>("Dialog", filters.componentByCode('role:"dialog",tabIndex:-1'));
|
||||
export const TabBar = waitForComponent("TabBar", filters.componentByCode("ref:this.tabBarRef,className:"));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue