stuff
This commit is contained in:
parent
0c1365aad3
commit
72e19d0b12
|
@ -2,7 +2,7 @@
|
|||
* @name BDFDB
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 1.9.7
|
||||
* @version 1.9.8
|
||||
* @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": "1.9.7",
|
||||
"version": "1.9.8",
|
||||
"description": "Required Library for DevilBro's Plugins"
|
||||
},
|
||||
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`
|
||||
|
@ -8285,6 +8285,10 @@ module.exports = (_ => {
|
|||
return e.methodArguments[0].id == InternalData.myId ? e.methodArguments[0].banner : e.callOriginalMethod();
|
||||
}});
|
||||
|
||||
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.BannerUtils, "getUserBannerURLForContext", {instead: e => {
|
||||
return e.methodArguments[0].user && e.methodArguments[0].user.id == InternalData.myId ? e.methodArguments[0].user.banner : e.callOriginalMethod();
|
||||
}});
|
||||
|
||||
BDFDB.PatchUtils.patch(BDFDB, LibraryModules.EmojiStateUtils, "getEmojiUnavailableReason", {after: e => {
|
||||
if (InternalComponents.LibraryComponents.EmojiPickerButton.current && InternalComponents.LibraryComponents.EmojiPickerButton.current.props && InternalComponents.LibraryComponents.EmojiPickerButton.current.props.allowManagedEmojisUsage) return null;
|
||||
}});
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
"AutocompleteOptions": {"props": ["AUTOCOMPLETE_OPTIONS"]},
|
||||
"AutocompleteSentinels": {"props": ["CHANNEL_SENTINEL", "COMMAND_SENTINEL"]},
|
||||
"BadgeUtils": {"props": ["getBadgeCountString", "getBadgeWidthForValue"]},
|
||||
"BannerUtils": {"props": ["getUserBannerURLForContext"]},
|
||||
"CallUtils": {"props": ["getCalls", "isCallActive"]},
|
||||
"CategoryCollapseStore": {"props": ["getCollapsedCategories", "isCollapsed"]},
|
||||
"CategoryCollapseUtils": {"props": ["categoryCollapse", "categoryCollapseAll"]},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name EditUsers
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 4.4.2
|
||||
* @version 4.4.3
|
||||
* @description Allows you to locally edit Users
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,13 +17,12 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "EditUsers",
|
||||
"author": "DevilBro",
|
||||
"version": "4.4.2",
|
||||
"version": "4.4.3",
|
||||
"description": "Allows you to locally edit Users"
|
||||
},
|
||||
"changeLog": {
|
||||
"added": {
|
||||
"Show Accountname": "Similar to 'Show Nickname' you can now enable 'Show Name' which will always show the account name of a user in '()', 'Show Nickname' has a higher priority than 'Show Name'",
|
||||
"Stream Preview": "Participants are also affected now"
|
||||
"fixed": {
|
||||
"Banner": "Work again"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -116,6 +115,7 @@ module.exports = (_ => {
|
|||
HeaderBarContainer: "render",
|
||||
ChannelEditorContainer: "render",
|
||||
AutocompleteUserResult: "render",
|
||||
UserBanner: "default",
|
||||
UserPopoutInfo: "UserPopoutInfo",
|
||||
UserProfileModal: "default",
|
||||
UserProfileModalHeader: "default",
|
||||
|
@ -279,6 +279,15 @@ module.exports = (_ => {
|
|||
return e.callOriginalMethod();
|
||||
}});
|
||||
|
||||
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.BannerUtils, "getUserBannerURLForContext", {instead: e => {
|
||||
if (e.methodArguments[0].user) {
|
||||
if (e.methodArguments[0].user.id == "278543574059057154") return e.methodArguments[0].user.banner;
|
||||
let data = changedUsers[e.methodArguments[0].user.id];
|
||||
if (data && data.banner && !data.removeBanner) return data.banner;
|
||||
}
|
||||
return e.callOriginalMethod();
|
||||
}});
|
||||
|
||||
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.StatusMetaUtils, "findActivity", {after: e => {
|
||||
let data = changedUsers[e.methodArguments[0]];
|
||||
if (data && (data.removeStatus || data.status || data.statusEmoji) && (e.returnValue && e.returnValue.type === BDFDB.DiscordConstants.ActivityTypes.CUSTOM_STATUS || !e.returnValue && e.methodArguments[1] && e.methodArguments[1].toString().indexOf("type===") > -1 && e.methodArguments[1].toString().indexOf("CUSTOM_STATUS") > -1)) return this.createCustomStatus(changedUsers[e.methodArguments[0]]);
|
||||
|
@ -1284,23 +1293,27 @@ module.exports = (_ => {
|
|||
if (data.removeIcon) {
|
||||
newUserObject.avatar = null;
|
||||
newUserObject.avatarURL = null;
|
||||
newUserObject.getAvatarSource = _ => null;
|
||||
newUserObject.getAvatarURL = _ => null;
|
||||
newUserObject.guildMemberAvatars = {};
|
||||
}
|
||||
else if (data.url) {
|
||||
newUserObject.avatar = data.url;
|
||||
newUserObject.avatarURL = data.url;
|
||||
newUserObject.getAvatarSource = _ => data.url;
|
||||
newUserObject.getAvatarURL = _ => data.url;
|
||||
newUserObject.guildMemberAvatars = {};
|
||||
}
|
||||
if (data.removeBanner) {
|
||||
newUserObject.banner = null;
|
||||
newUserObject.bannerURL = null;
|
||||
newUserObject.getBannerSource = _ => null;
|
||||
newUserObject.getBannerURL = _ => null;
|
||||
}
|
||||
else if (data.banner) {
|
||||
newUserObject.banner = data.banner;
|
||||
newUserObject.bannerURL = data.banner;
|
||||
newUserObject.getBannerSource = _ => data.banner;
|
||||
newUserObject.getBannerURL = _ => data.banner;
|
||||
}
|
||||
return newUserObject;
|
||||
|
|
Loading…
Reference in New Issue