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 * @name BDFDB
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 2.5.1 * @version 2.5.2
* @description Required Library for DevilBro's Plugins * @description Required Library for DevilBro's Plugins
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -19,7 +19,7 @@ module.exports = (_ => {
"info": { "info": {
"name": "BDFDB", "name": "BDFDB",
"author": "DevilBro", "author": "DevilBro",
"version": "2.5.1", "version": "2.5.2",
"description": "Required Library for DevilBro's Plugins" "description": "Required Library for DevilBro's Plugins"
}, },
"rawUrl": "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js" "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) { BDFDB.UserUtils.getBanner = function (id = BDFDB.UserUtils.me.id, guildId = Internal.LibraryModules.LastGuildStore.getGuildId(), canAnimate = false) {
let displayProfile = Internal.LibraryModules.MemberDisplayUtils.getDisplayProfile(id, guildId); 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()) { 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"]); if (!BDFDB.DiscordConstants.Permissions[permission]) BDFDB.LogUtils.warn([permission, "not found in Permissions"]);
@ -8155,7 +8155,6 @@ module.exports = (_ => {
Internal.patchedModules = { Internal.patchedModules = {
before: { before: {
SearchBar: "render", SearchBar: "render",
EmojiPicker: "type",
EmojiPickerListRow: "default" EmojiPickerListRow: "default"
}, },
after: { after: {
@ -8389,9 +8388,6 @@ module.exports = (_ => {
Internal.processDiscordTag = function (e) { Internal.processDiscordTag = function (e) {
if (e.instance && e.instance.props && e.returnvalue && e.instance.props.user) e.returnvalue.props.user = e.instance.props.user; 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) { 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}); 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"]}, "CircleIconButton": {"strings": ["className", ".default.circleIconButton"]},
"CustomStatusModal": {"class": "customstatusmodal"}, "CustomStatusModal": {"class": "customstatusmodal"},
"DirectMessage": {"class": "guildouter", "forceObserve": true}, "DirectMessage": {"class": "guildouter", "forceObserve": true},
"EmojiPicker": {"strings": ["EMOJI_PICKER_TAB_PANEL_ID", "diversitySelector"]},
"FocusRing": {"props": ["FocusRingScope"]}, "FocusRing": {"props": ["FocusRingScope"]},
"GuildFavorites": {"strings": [".favoriteIcon", "FAVORITES_GUILD_NAME"]}, "GuildFavorites": {"strings": [".favoriteIcon", "FAVORITES_GUILD_NAME"]},
"GuildFolderSettingsModal": {"lazyLoaded": true, "exported": true}, "GuildFolderSettingsModal": {"lazyLoaded": true, "exported": true},
@ -363,7 +362,7 @@
"DiscordTag": {"name": "DiscordTag"}, "DiscordTag": {"name": "DiscordTag"},
"Emoji": {"strings": ["emojiName", "shouldAnimate", "jumboable"], "value": "default"}, "Emoji": {"strings": ["emojiName", "shouldAnimate", "jumboable"], "value": "default"},
"EmojiButton": {"name": "EmojiButton"}, "EmojiButton": {"name": "EmojiButton"},
"EmojiPicker": {"strings": ["EMOJI_PICKER_TAB_PANEL_ID", "diversitySelector"]}, "EmojiPicker": {"name": "EmojiPicker"},
"Flex": {"props": ["Wrap", "Direction", "Child"]}, "Flex": {"props": ["Wrap", "Direction", "Child"]},
"FlowerStar": {"name": "FlowerStar"}, "FlowerStar": {"name": "FlowerStar"},
"FocusRingScope": {"props": ["FocusRingScope"], "value": "default"}, "FocusRingScope": {"props": ["FocusRingScope"], "value": "default"},

File diff suppressed because it is too large Load Diff

View File

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