Expose getPatchesByCaller
This commit is contained in:
parent
91249fe2b4
commit
fa87128157
|
@ -5,6 +5,7 @@ This changelog starts with the restructured 1.0.0 release that happened after co
|
||||||
## 1.2.1
|
## 1.2.1
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- Added `getPatchesByCaller` to `BdApi.Patcher`
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ BD has some other built-in features such as Emotes from Twitch, FFZ, and BBTV, a
|
||||||
The easiest way to find plugins and themes is to browse them on [our website: https://betterdiscord.app/](https://betterdiscord.app/). Additionally, in our [support servers](#support-servers) we have channels with lists of <u>official</u> plugins and themes.
|
The easiest way to find plugins and themes is to browse them on [our website: https://betterdiscord.app/](https://betterdiscord.app/). Additionally, in our [support servers](#support-servers) we have channels with lists of <u>official</u> plugins and themes.
|
||||||
|
|
||||||
### Support Servers?
|
### Support Servers?
|
||||||
There are two: [The main server](https://discord.gg/0Tmfo5ZbORCRqbAd), and [the backup](https://discord.gg/2HScm8j).
|
There are two: [The main server](https://discord.gg/bnSUxedypU), and [the backup](https://discord.gg/XqSpb9e3dq).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,9 @@ export default {
|
||||||
title: "Power Users & Developers",
|
title: "Power Users & Developers",
|
||||||
type: "improved",
|
type: "improved",
|
||||||
items: [
|
items: [
|
||||||
"Plugin data retrieval will now turn the correct values instead of `undefined` for falsey values.",
|
"Plugin data retrieval will now return the correct values instead of `undefined` for falsey values.",
|
||||||
"Plugin data can now be set before being retrieved.",
|
"Plugin data can now be set before being retrieved.",
|
||||||
|
"The `Patcher` in `BdApi` now has a `getPatchesByCaller` function which will return all the patches corresponding to a caller string.",
|
||||||
"Plugins that fail on initial load will no longer be forever in a broken state. Thanks, Strencher. (https://github.com/Strencher)",
|
"Plugins that fail on initial load will no longer be forever in a broken state. Thanks, Strencher. (https://github.com/Strencher)",
|
||||||
"React DevTools should now work on Linux! Thanks, Qb. (https://github.com/QbDesu)"
|
"React DevTools should now work on Linux! Thanks, Qb. (https://github.com/QbDesu)"
|
||||||
]
|
]
|
||||||
|
|
|
@ -296,6 +296,10 @@ BdApi.Patcher = {
|
||||||
before: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {type: "before"})),
|
before: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {type: "before"})),
|
||||||
instead: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {type: "instead"})),
|
instead: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {type: "instead"})),
|
||||||
after: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {type: "after"})),
|
after: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {type: "after"})),
|
||||||
|
getPatchesByCaller: (caller) => {
|
||||||
|
if (typeof(caller) !== "string") return Logger.err("BdApi.Patcher", "Parameter 0 of getPatchesByCaller must be a string representing the caller");
|
||||||
|
return Patcher.getPatchesByCaller(caller);
|
||||||
|
},
|
||||||
unpatchAll: (caller) => {
|
unpatchAll: (caller) => {
|
||||||
if (typeof(caller) !== "string") return Logger.err("BdApi.Patcher", "Parameter 0 of unpatchAll must be a string representing the caller");
|
if (typeof(caller) !== "string") return Logger.err("BdApi.Patcher", "Parameter 0 of unpatchAll must be a string representing the caller");
|
||||||
return Patcher.unpatchAll(caller);
|
return Patcher.unpatchAll(caller);
|
||||||
|
|
Loading…
Reference in New Issue