This commit is contained in:
Mirco Wittrien 2022-05-12 12:35:25 +02:00
parent 23afec190e
commit 51e1a27a0c
3 changed files with 25 additions and 14 deletions

View File

@ -2,7 +2,7 @@
* @name BDFDB
* @author DevilBro
* @authorId 278543574059057154
* @version 2.3.4
* @version 2.3.5
* @description Required Library for DevilBro's Plugins
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -19,7 +19,7 @@ module.exports = (_ => {
"info": {
"name": "BDFDB",
"author": "DevilBro",
"version": "2.3.4",
"version": "2.3.5",
"description": "Required Library for DevilBro's Plugins"
},
"rawUrl": "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js"
@ -3159,6 +3159,16 @@ module.exports = (_ => {
}
catch (err) {BDFDB.LogUtils.error(["Could not render React Element!", err]);}
};
BDFDB.ReactUtils.hookCall = function (callback, args) {
if (typeof callback != "function") return null;
let returnValue = null, tempNode = document.createElement("div");
BDFDB.ReactUtils.render(BDFDB.ReactUtils.createElement(_ => {
returnValue = callback(args);
return null;
}), tempNode);
BDFDB.ReactUtils.unmountComponentAtNode(tempNode);
return returnValue;
};
BDFDB.MessageUtils = {};
BDFDB.MessageUtils.isSystemMessage = function (message) {

View File

@ -129,6 +129,7 @@
"SpotifyUtils": {"props": ["setActiveDevice", "pause"]},
"StageChannelLiveStore": {"props": ["getAllLiveStageChannels", "useAllLiveStageChannels"]},
"StageChannelStore": {"props": ["getStageInstanceByChannel", "getAllStageInstances"]},
"StageChannelUtils": {"props": ["getMutableParticipants", "getParticipantCount"]},
"StateStoreUtils": {"props": ["useStateFromStores", "useStateFromStoresArray"]},
"StatusMetaUtils": {"props": ["getApplicationActivity", "getStatus", "getState"]},
"StoreChangeUtils": {"props": ["get", "set", "clear", "remove"]},

File diff suppressed because one or more lines are too long