From 3940b567ae8daee8ea59304dc510b12348f08b1e Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Mon, 11 Mar 2024 20:02:55 +0100 Subject: [PATCH] Update CustomQuoter.plugin.js --- Plugins/CustomQuoter/CustomQuoter.plugin.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Plugins/CustomQuoter/CustomQuoter.plugin.js b/Plugins/CustomQuoter/CustomQuoter.plugin.js index 7c808f08d6..85903a36de 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.4 + * @version 1.3.5 * @description Brings back the Quote Feature and allows you to set your own Quote Formats * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -406,7 +406,10 @@ module.exports = (_ => { let userMember = channel.guild_id && BDFDB.LibraryStores.GuildMemberStore.getMember(guild.id, match); return `@ ${userMember && userMember.nick || user.globalName || user.username}`; } - else if (channel.guild_id && guild.roles[match] && guild.roles[match].name) return `${guild.roles[match].name.indexOf("@") == 0 ? "" : "@"} ${guild.roles[match].name}`; + else if (channel.guild_id) { + let roles = guild.roles || BDFDB.LibraryStores.GuildStore.getRoles(guild.id); + if (roles[match] && roles[match].name) return `${roles[match].name.indexOf("@") == 0 ? "" : "@"} ${roles[match].name}`; + } return string; }); }