Update ServerDetails.plugin.js

This commit is contained in:
Mirco Wittrien 2024-03-11 20:07:01 +01:00
parent 3940b567ae
commit 9911cbddc9
1 changed files with 31 additions and 30 deletions

View File

@ -2,7 +2,7 @@
* @name ServerDetails
* @author DevilBro
* @authorId 278543574059057154
* @version 1.1.8
* @version 1.1.9
* @description Shows Server Details in the Server List Tooltip
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -120,6 +120,7 @@ module.exports = (_ => {
}
else {
let src = this.props.guild.getIconURL(4096, this.props.guild.icon && BDFDB.LibraryModules.IconUtils.isAnimatedIconHash(this.props.guild.icon));
let roles = this.props.guild.roles || BDFDB.LibraryStores.GuildStore.getRoles(this.props.guild.id);
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
direction: BDFDB.LibraryComponents.Flex.Direction.VERTICAL,
align: BDFDB.LibraryComponents.Flex.Align.CENTER,
@ -155,9 +156,9 @@ module.exports = (_ => {
prefix: BDFDB.LanguageUtils.LanguageStrings.CHANNELS,
string: BDFDB.LibraryStores.GuildChannelStore.getChannels(this.props.guild.id).count
}),
_this.settings.items.roles && BDFDB.ReactUtils.createElement(GuildDetailsRowComponent, {
_this.settings.items.roles && roles && BDFDB.ReactUtils.createElement(GuildDetailsRowComponent, {
prefix: BDFDB.LanguageUtils.LanguageStrings.ROLES,
string: Object.keys(this.props.guild.roles).length
string: Object.keys(BDFDB.ObjectUtils.filter(roles, n => n.id != this.props.guild.id)).length
}),
_this.settings.items.language && BDFDB.ReactUtils.createElement(GuildDetailsRowComponent, {
prefix: BDFDB.LanguageUtils.LanguageStrings.LANGUAGE,