This commit is contained in:
Mirco Wittrien 2021-07-29 20:46:18 +02:00
parent 2213bee6c1
commit d9728d34b8
3 changed files with 36 additions and 20 deletions

View File

@ -2,7 +2,7 @@
* @name BDFDB
* @author DevilBro
* @authorId 278543574059057154
* @version 1.7.9
* @version 1.7.10
* @description Required Library for DevilBro's Plugins
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -19,22 +19,10 @@ module.exports = (_ => {
"info": {
"name": "BDFDB",
"author": "DevilBro",
"version": "1.7.9",
"version": "1.7.10",
"description": "Required Library for DevilBro's Plugins"
},
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`,
"changeLog": {
"progress": {
"Vacation": "I am back from Vacation"
},
"fixed": {
"Text Scrollers": "No longer get stuck at the end position sometimes",
"Popups": "Open again (PersonalPins, ClickableMentions, Date Formatters, etc.)"
},
"added": {
"Data Attributes": "Added user id data attribute to body"
}
}
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`
};
const DiscordObjects = {};
@ -2197,9 +2185,9 @@ module.exports = (_ => {
methodArguments: arguments,
originalMethod: originalMethod,
originalMethodName: methodName,
callOriginalMethod: _ => {if (!stopCall) data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments)},
callOriginalMethodAfterwards: _ => {callInstead = true;},
stopOriginalMethodCall: _ => {stopCall = true;}
callOriginalMethod: _ => data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments),
callOriginalMethodAfterwards: _ => callInstead = true,
stopOriginalMethodCall: _ => stopCall = true
};
if (module.BDFDB_patches && module.BDFDB_patches[methodName]) {
for (let priority in module.BDFDB_patches[methodName].before) for (let id in BDFDB.ObjectUtils.sort(module.BDFDB_patches[methodName].before[priority])) {
@ -3061,8 +3049,12 @@ module.exports = (_ => {
let channel = typeof channelOrId == "string" ? LibraryModules.ChannelStore.getChannel(channelOrId) : channelOrId;
return BDFDB.ObjectUtils.is(channel) && (channel.type == BDFDB.DiscordConstants.ChannelTypes.GUILD_TEXT || channel.type == BDFDB.DiscordConstants.ChannelTypes.GUILD_STORE || channel.type == BDFDB.DiscordConstants.ChannelTypes.GUILD_ANNOUNCEMENT);
};
BDFDB.ChannelUtils.isThread = function (channelOrId) {
let channel = typeof channelOrId == "string" ? LibraryModules.ChannelStore.getChannel(channelOrId) : channelOrId;
return channel && channel.isThread();
};
BDFDB.ChannelUtils.markAsRead = function (channelIds) {
let unreadChannels = [channelIds].flat(10).filter(id => id && typeof id == "string" && BDFDB.ChannelUtils.isTextChannel(id) && (LibraryModules.UnreadChannelUtils.hasUnread(id) || LibraryModules.UnreadChannelUtils.getMentionCount(id) > 0)).map(id => ({
let unreadChannels = [channelIds].flat(10).filter(id => id && typeof id == "string" && (BDFDB.ChannelUtils.isTextChannel(id) || BDFDB.ChannelUtils.isThread(id)) && (LibraryModules.UnreadChannelUtils.hasUnread(id) || LibraryModules.UnreadChannelUtils.getMentionCount(id) > 0)).map(id => ({
channelId: id,
messageId: LibraryModules.UnreadChannelUtils.lastMessageId(id)
}));
@ -4510,7 +4502,7 @@ module.exports = (_ => {
formatVars[err.toString().split("for: ")[1]] = value != null ? (value === 0 ? "0" : value) : "undefined";
if (stringObj.intMessage) {
try {for (let hook of stringObj.intMessage.format(formatVars).match(/\([^\(\)]+\)/gi)) formatVars[hook.replace(/[\(\)]/g, "")] = n => n;}
catch (err2) {if (item == "USER_ACTIVITY_LISTENING_ARTISTS") console.log(2, err2, formatVars);}
catch (err2) {}
}
}
}

View File

@ -2784,6 +2784,9 @@ img[src="/assets/cef02719c12d8aaf38894c16dca7fbe6.svg"] { /* rolesettings addr
.icon-RTGJu3.targetMember-2iuwxX::before {
-webkit-mask: url(https://discord.com/assets/af043346e036ef7b1aac1cf42cd1e699.svg);
}
.icon-RTGJu3.thread-1y5rGU::before {
-webkit-mask: url(https://discord.com/assets/071cf571ff2467f7fefaa2287c82bc58.svg);
}
.icon-RTGJu3.targetPermission-ZRUN5n::before {
-webkit-mask: url(https://discord.com/assets/2a37995eb832bae805190a93ba043857.svg);
}
@ -2805,6 +2808,15 @@ img[src="/assets/cef02719c12d8aaf38894c16dca7fbe6.svg"] { /* rolesettings addr
.icon-RTGJu3.targetIntegration-3rnyMN::before {
-webkit-mask: url(https://discord.com/assets/da8463a04b4a289801d2516f50eb4c19.svg);
}
.icon-RTGJu3.targetSticker-2Z_JhN::before {
-webkit-mask: url(https://discord.com/assets/a4e8185fe5f5aadd2f861bbc9c779298.svg);
}
.icon-RTGJu3.targetStageInstance-29rvVP::before {
-webkit-mask: url(https://discord.com/assets/0c3abaf62cd500adbc022c85e06676a7.svg);
}
.icon-RTGJu3.targetGuildScheduledEvent-1EbkkW::before {
-webkit-mask: url(https://discord.com/assets/adcbafa0017394ce023dd551a67f31c2.svg);
}
#app-mount .card-o7rAq- { /* integrationsettings card */
border-color: rgba(var(--transparencycolor), .1)

View File

@ -2200,6 +2200,9 @@ img[src='/assets/58957d928db6fb9d4658eb882f33d7bc.svg'] {
.icon-RTGJu3.targetMember-2iuwxX::before {
-webkit-mask: url(https://discord.com/assets/af043346e036ef7b1aac1cf42cd1e699.svg);
}
.icon-RTGJu3.thread-1y5rGU::before {
-webkit-mask: url(https://discord.com/assets/071cf571ff2467f7fefaa2287c82bc58.svg);
}
.icon-RTGJu3.targetPermission-ZRUN5n::before {
-webkit-mask: url(https://discord.com/assets/2a37995eb832bae805190a93ba043857.svg);
}
@ -2221,6 +2224,15 @@ img[src='/assets/58957d928db6fb9d4658eb882f33d7bc.svg'] {
.icon-RTGJu3.targetIntegration-3rnyMN::before {
-webkit-mask: url(https://discord.com/assets/da8463a04b4a289801d2516f50eb4c19.svg);
}
.icon-RTGJu3.targetSticker-2Z_JhN::before {
-webkit-mask: url(https://discord.com/assets/a4e8185fe5f5aadd2f861bbc9c779298.svg);
}
.icon-RTGJu3.targetStageInstance-29rvVP::before {
-webkit-mask: url(https://discord.com/assets/0c3abaf62cd500adbc022c85e06676a7.svg);
}
.icon-RTGJu3.targetGuildScheduledEvent-1EbkkW::before {
-webkit-mask: url(https://discord.com/assets/adcbafa0017394ce023dd551a67f31c2.svg);
}
#app-mount .rolePills-32B_DQ {
color: rgba(var(--textbrightest),.8);