From 36da7546950cb57bdc1ee8707c1923c39b081624 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 23 Jun 2023 18:16:22 +0200 Subject: [PATCH] stuff --- Plugins/CustomQuoter/CustomQuoter.plugin.js | 4 ++-- Plugins/FriendNotifications/FriendNotifications.plugin.js | 6 +++--- Plugins/ServerDetails/ServerDetails.plugin.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Plugins/CustomQuoter/CustomQuoter.plugin.js b/Plugins/CustomQuoter/CustomQuoter.plugin.js index 1517f00eff..6b62b06632 100644 --- a/Plugins/CustomQuoter/CustomQuoter.plugin.js +++ b/Plugins/CustomQuoter/CustomQuoter.plugin.js @@ -2,7 +2,7 @@ * @name CustomQuoter * @author DevilBro * @authorId 278543574059057154 - * @version 1.3.3 + * @version 1.3.4 * @description Brings back the Quote Feature and allows you to set your own Quote Formats * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -412,7 +412,7 @@ module.exports = (_ => { .replace("$mention", channel.isDM() ? "" : `<@!${message.author.id}>`) .replace("$link", ``) .replace("$authorName", member && member.nick || message.author.globalName || message.author.username || "") - .replace("$authorAccount", message.author.discriminator ? `${message.author.username}#${message.author.discriminator}` : message.author.username) + .replace("$authorAccount", message.author.discriminator && message.author.discriminator != "0" ? `${message.author.username}#${message.author.discriminator}` : message.author.username) .replace("$authorId", message.author.id || "") .replace("$channelName", channel.name || "") .replace("$channelId", channel.id || "") diff --git a/Plugins/FriendNotifications/FriendNotifications.plugin.js b/Plugins/FriendNotifications/FriendNotifications.plugin.js index 6ea6e9d2aa..6c1480ae61 100644 --- a/Plugins/FriendNotifications/FriendNotifications.plugin.js +++ b/Plugins/FriendNotifications/FriendNotifications.plugin.js @@ -2,7 +2,7 @@ * @name FriendNotifications * @author DevilBro * @authorId 278543574059057154 - * @version 1.9.2 + * @version 1.9.3 * @description Shows a Notification when a Friend or a User, you choose to observe, changes their Status * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -838,8 +838,8 @@ module.exports = (_ => { let string = this.settings.notificationStrings[screensharingNotice ? "screensharing" : customChanged ? "custom" : loginNotice ? "login" : status.name] || "'$user' changed status to '$status'"; let hasUserPlaceholder = string.indexOf("$user") > -1; let toastString = BDFDB.StringUtils.htmlEscape(string) - .replace(/'{0,1}\$user'{0,1}/g, `${BDFDB.StringUtils.htmlEscape(name)}${this.settings.general.showDiscriminator && user.discriminator ? ("#" + user.discriminator) : ""}`) - .replace(/'{0,1}\$nick'{0,1}/g, nickname ? `${BDFDB.StringUtils.htmlEscape(nickname)}${!hasUserPlaceholder && this.settings.general.showDiscriminator && user.discriminator ? ("#" + user.discriminator) : ""}` : !hasUserPlaceholder ? `${BDFDB.StringUtils.htmlEscape(name)}${this.settings.general.showDiscriminator && user.discriminator ? ("#" + user.discriminator) : ""}` : "") + .replace(/'{0,1}\$user'{0,1}/g, `${BDFDB.StringUtils.htmlEscape(name)}${this.settings.general.showDiscriminator && user.discriminator && user.discriminator != "0" ? ("#" + user.discriminator) : ""}`) + .replace(/'{0,1}\$nick'{0,1}/g, nickname ? `${BDFDB.StringUtils.htmlEscape(nickname)}${!hasUserPlaceholder && this.settings.general.showDiscriminator && user.discriminator && user.discriminator != "0" ? ("#" + user.discriminator) : ""}` : !hasUserPlaceholder ? `${BDFDB.StringUtils.htmlEscape(name)}${this.settings.general.showDiscriminator && user.discriminator && user.discriminator != "0" ? ("#" + user.discriminator) : ""}` : "") .replace(/'{0,1}\$statusOld'{0,1}/g, `${oldStatusName}`) .replace(/'{0,1}\$status'{0,1}/g, `${statusName}`); if (status.activity) { diff --git a/Plugins/ServerDetails/ServerDetails.plugin.js b/Plugins/ServerDetails/ServerDetails.plugin.js index a2d8b5eb3b..e6582a4a7c 100644 --- a/Plugins/ServerDetails/ServerDetails.plugin.js +++ b/Plugins/ServerDetails/ServerDetails.plugin.js @@ -2,7 +2,7 @@ * @name ServerDetails * @author DevilBro * @authorId 278543574059057154 - * @version 1.1.7 + * @version 1.1.8 * @description Shows Server Details in the Server List Tooltip * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -128,7 +128,7 @@ module.exports = (_ => { })), _this.settings.items.owner && BDFDB.ReactUtils.createElement(GuildDetailsRowComponent, { prefix: BDFDB.LanguageUtils.LanguageStrings.GUILD_OWNER, - string: !owner ? BDFDB.LanguageUtils.LanguageStrings.UNKNOWN_USER : (!owner.discriminator ? owner.username : `${owner.username}#${owner.discriminator}`) + string: !owner ? BDFDB.LanguageUtils.LanguageStrings.UNKNOWN_USER : (owner.discriminator && owner.discriminator != "0" ? `${owner.username}#${owner.discriminator}` : owner.username) }), _this.settings.items.creationDate && BDFDB.ReactUtils.createElement(GuildDetailsRowComponent, { prefix: _this.labels.creation_date,