Update ServerDetails.plugin.js
This commit is contained in:
parent
3940b567ae
commit
9911cbddc9
|
@ -2,7 +2,7 @@
|
||||||
* @name ServerDetails
|
* @name ServerDetails
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 1.1.8
|
* @version 1.1.9
|
||||||
* @description Shows Server Details in the Server List Tooltip
|
* @description Shows Server Details in the Server List Tooltip
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -120,6 +120,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let src = this.props.guild.getIconURL(4096, this.props.guild.icon && BDFDB.LibraryModules.IconUtils.isAnimatedIconHash(this.props.guild.icon));
|
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, {
|
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
||||||
direction: BDFDB.LibraryComponents.Flex.Direction.VERTICAL,
|
direction: BDFDB.LibraryComponents.Flex.Direction.VERTICAL,
|
||||||
align: BDFDB.LibraryComponents.Flex.Align.CENTER,
|
align: BDFDB.LibraryComponents.Flex.Align.CENTER,
|
||||||
|
@ -155,9 +156,9 @@ module.exports = (_ => {
|
||||||
prefix: BDFDB.LanguageUtils.LanguageStrings.CHANNELS,
|
prefix: BDFDB.LanguageUtils.LanguageStrings.CHANNELS,
|
||||||
string: BDFDB.LibraryStores.GuildChannelStore.getChannels(this.props.guild.id).count
|
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,
|
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, {
|
_this.settings.items.language && BDFDB.ReactUtils.createElement(GuildDetailsRowComponent, {
|
||||||
prefix: BDFDB.LanguageUtils.LanguageStrings.LANGUAGE,
|
prefix: BDFDB.LanguageUtils.LanguageStrings.LANGUAGE,
|
||||||
|
|
Loading…
Reference in New Issue