mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-14 17:13:05 -04:00
fix forum channel count
This commit is contained in:
parent
19979e440e
commit
83f091b0a6
2 changed files with 12 additions and 6 deletions
|
@ -3,9 +3,9 @@ const { PERMISSION_GROUPS } = require('#constants');
|
||||||
|
|
||||||
const { createEmbed, page, formatPaginationEmbeds } = require("#utils/embed");
|
const { createEmbed, page, formatPaginationEmbeds } = require("#utils/embed");
|
||||||
const { guildFeaturesField } = require("#utils/fields");
|
const { guildFeaturesField } = require("#utils/fields");
|
||||||
const { getAcronym, getGuildIcon } = require('#utils/guilds');
|
const { getGuildIcon } = require('#utils/guilds');
|
||||||
const { acknowledge } = require('#utils/interactions');
|
const { acknowledge } = require('#utils/interactions');
|
||||||
const { icon, highlight, timestamp, codeblock, smallIconPill, smallPill } = require("#utils/markdown");
|
const { icon, timestamp, codeblock, smallIconPill, smallPill } = require("#utils/markdown");
|
||||||
const { editOrReply } = require("#utils/message");
|
const { editOrReply } = require("#utils/message");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -32,7 +32,7 @@ module.exports = {
|
||||||
const textChannels = channels.filter((channel) => channel.isGuildText).length;
|
const textChannels = channels.filter((channel) => channel.isGuildText).length;
|
||||||
const voiceChannels = channels.filter((channel) => channel.isGuildVoice).length;
|
const voiceChannels = channels.filter((channel) => channel.isGuildVoice).length;
|
||||||
const stageChannels = channels.filter((channel) => channel.isGuildStageVoice).length;
|
const stageChannels = channels.filter((channel) => channel.isGuildStageVoice).length;
|
||||||
const forumChannels = channels.filter((channel) => channel.isGuildForumChannel).length;
|
const forumChannels = channels.filter((channel) => channel.isGuildForum).length;
|
||||||
|
|
||||||
const g = context.guild
|
const g = context.guild
|
||||||
// Guild Card
|
// Guild Card
|
||||||
|
@ -77,7 +77,7 @@ module.exports = {
|
||||||
inline: false
|
inline: false
|
||||||
})
|
})
|
||||||
|
|
||||||
if((g.banner || g.splash || g.discoverySplash) != undefined){
|
if((g.banner || g.splash || g.discoverySplash) !== undefined){
|
||||||
guildCard.image = {
|
guildCard.image = {
|
||||||
url: (g.bannerUrl || g.splashUrl || g.discoverySplashUrl) + "?size=4096"
|
url: (g.bannerUrl || g.splashUrl || g.discoverySplashUrl) + "?size=4096"
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ module.exports = {
|
||||||
let i = 0;
|
let i = 0;
|
||||||
let ic = Math.ceil(featureCards.length / 2);
|
let ic = Math.ceil(featureCards.length / 2);
|
||||||
|
|
||||||
if(ic == 1) featureCards[0].name = `${icon("list")} Server Features`
|
if(ic === 1) featureCards[0].name = `${icon("list")} Server Features`
|
||||||
while(featureCards.length >= 1){
|
while(featureCards.length >= 1){
|
||||||
i++;
|
i++;
|
||||||
const sub = featureCards.splice(0, 2)
|
const sub = featureCards.splice(0, 2)
|
||||||
|
|
|
@ -49,7 +49,13 @@ module.exports.highlight = function(content = ""){
|
||||||
return "`" + content.toString().replace(/\`/g, 'ˋ') + "`"
|
return "`" + content.toString().replace(/\`/g, 'ˋ') + "`"
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.codeblock = function(type, content = ""){
|
/**
|
||||||
|
* Formats a Markdown Codeblock
|
||||||
|
* @param type Language Type
|
||||||
|
* @param {Array} content Lines
|
||||||
|
* @returns {string} Formatted Codeblock
|
||||||
|
*/
|
||||||
|
module.exports.codeblock = function(type, content = []){
|
||||||
if(!content.length) return "```" + type + "```"
|
if(!content.length) return "```" + type + "```"
|
||||||
return "```" + type + "\n" + _escapeCodeblock(content.join('\n')) + "```"
|
return "```" + type + "\n" + _escapeCodeblock(content.join('\n')) + "```"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue