This commit is contained in:
Mirco Wittrien 2022-08-26 12:12:45 +02:00
parent 70272214b4
commit 848d3cf1cc
4 changed files with 8 additions and 9140 deletions

View File

@ -2,7 +2,7 @@
* @name BDFDB
* @author DevilBro
* @authorId 278543574059057154
* @version 2.5.1
* @version 2.5.2
* @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.5.1",
"version": "2.5.2",
"description": "Required Library for DevilBro's Plugins"
},
"rawUrl": "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js"
@ -3258,7 +3258,7 @@ module.exports = (_ => {
};
BDFDB.UserUtils.getBanner = function (id = BDFDB.UserUtils.me.id, guildId = Internal.LibraryModules.LastGuildStore.getGuildId(), canAnimate = false) {
let displayProfile = Internal.LibraryModules.MemberDisplayUtils.getDisplayProfile(id, guildId);
return (Internal.LibraryModules.IconUtils.getUserBannerURL(Object.assign({banner: displayProfile.banner, id: id}, {canAnimate})) || "").split("?")[0];
return (Internal.LibraryModules.IconUtils.getUserBannerURL(Object.assign({banner: displayProfile && displayProfile.banner, id: id}, {canAnimate})) || "").split("?")[0];
};
BDFDB.UserUtils.can = function (permission, id = BDFDB.UserUtils.me.id, channelId = Internal.LibraryModules.LastChannelStore.getChannelId()) {
if (!BDFDB.DiscordConstants.Permissions[permission]) BDFDB.LogUtils.warn([permission, "not found in Permissions"]);
@ -8155,7 +8155,6 @@ module.exports = (_ => {
Internal.patchedModules = {
before: {
SearchBar: "render",
EmojiPicker: "type",
EmojiPickerListRow: "default"
},
after: {
@ -8389,9 +8388,6 @@ module.exports = (_ => {
Internal.processDiscordTag = function (e) {
if (e.instance && e.instance.props && e.returnvalue && e.instance.props.user) e.returnvalue.props.user = e.instance.props.user;
};
Internal.processEmojiPicker = function (e) {
if (BDFDB.ObjectUtils.toArray(PluginStores.loaded).filter(p => p.started).some(p => p.onSystemMessageOptionContextMenu || p.onSystemMessageOptionToolbar || p.onMessageOptionContextMenu || p.onMessageOptionToolbar)) e.instance.props.persistSearch = true;
};
Internal.processEmojiPickerListRow = function (e) {
if (e.instance.props.emojiDescriptors && Internal.LibraryComponents.EmojiPickerButton.current && Internal.LibraryComponents.EmojiPickerButton.current.props && Internal.LibraryComponents.EmojiPickerButton.current.props.allowManagedEmojisUsage) for (let i in e.instance.props.emojiDescriptors) e.instance.props.emojiDescriptors[i] = Object.assign({}, e.instance.props.emojiDescriptors[i], {isDisabled: false});
};

View File

@ -250,7 +250,6 @@
"CircleIconButton": {"strings": ["className", ".default.circleIconButton"]},
"CustomStatusModal": {"class": "customstatusmodal"},
"DirectMessage": {"class": "guildouter", "forceObserve": true},
"EmojiPicker": {"strings": ["EMOJI_PICKER_TAB_PANEL_ID", "diversitySelector"]},
"FocusRing": {"props": ["FocusRingScope"]},
"GuildFavorites": {"strings": [".favoriteIcon", "FAVORITES_GUILD_NAME"]},
"GuildFolderSettingsModal": {"lazyLoaded": true, "exported": true},
@ -363,7 +362,7 @@
"DiscordTag": {"name": "DiscordTag"},
"Emoji": {"strings": ["emojiName", "shouldAnimate", "jumboable"], "value": "default"},
"EmojiButton": {"name": "EmojiButton"},
"EmojiPicker": {"strings": ["EMOJI_PICKER_TAB_PANEL_ID", "diversitySelector"]},
"EmojiPicker": {"name": "EmojiPicker"},
"Flex": {"props": ["Wrap", "Direction", "Child"]},
"FlowerStar": {"name": "FlowerStar"},
"FocusRingScope": {"props": ["FocusRingScope"], "value": "default"},

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
* @name EditUsers
* @author DevilBro
* @authorId 278543574059057154
* @version 4.6.1
* @version 4.6.2
* @description Allows you to locally edit Users
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "EditUsers",
"author": "DevilBro",
"version": "4.6.1",
"version": "4.6.2",
"description": "Allows you to locally edit Users"
}
};
@ -278,6 +278,7 @@ module.exports = (_ => {
}});
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.MemberDisplayUtils, "getDisplayProfile", {after: e => {
if (!e.returnValue) return;
let data = changedUsers[e.methodArguments[0]];
if (data && (data.banner || data.removeBanner)) {
e.returnValue = new BDFDB.DiscordObjects.DisplayProfile(e.returnValue, e.returnValue);
@ -1579,8 +1580,7 @@ module.exports = (_ => {
grow: 0,
label: BDFDB.LanguageUtils.LanguageStrings.REMOVE,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
value: data.removeBanner && user.id != "278543574059057154",
disabled: user.id == "278543574059057154",
value: data.removeBanner,
onChange: value => {
newData.removeBanner = value;
if (value) {
@ -1602,7 +1602,6 @@ module.exports = (_ => {
maxLength: 100000000000000000000,
value: data.banner,
placeholder: BDFDB.UserUtils.getBanner(user.id),
disabled: data.removeBanner || user.id == "278543574059057154",
ref: instance => {if (instance) bannerInput = instance;},
onChange: (value, instance) => {
this.checkUrl(value, instance).then(returnValue => newData.banner = returnValue);