Update CustomQuoter.plugin.js

This commit is contained in:
Mirco Wittrien 2024-03-11 20:02:55 +01:00
parent 7aa6ae35f0
commit 3940b567ae
1 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* @name CustomQuoter * @name CustomQuoter
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @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 * @description Brings back the Quote Feature and allows you to set your own Quote Formats
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -406,7 +406,10 @@ module.exports = (_ => {
let userMember = channel.guild_id && BDFDB.LibraryStores.GuildMemberStore.getMember(guild.id, match); let userMember = channel.guild_id && BDFDB.LibraryStores.GuildMemberStore.getMember(guild.id, match);
return `@${userMember && userMember.nick || user.globalName || user.username}`; 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; return string;
}); });
} }