mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 22:16:13 +00:00
fix: Updated user message in status commands
This commit is contained in:
1 parent
5054da995a
commit
15f1a876e8
2 files changed
+23
-10
No files matched your search
@@ -1,6 +1,10 @@
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, systemServerGuildIds } = require('../config.json');
|
||||
const {
|
||||
embedColors,
|
||||
embedIcons,
|
||||
systemServerGuildIds
|
||||
} = require('../config.json');
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -13,9 +17,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**No permission**\nThe command \`${interaction.commandName}\` cannot be executed in this server.`
|
||||
`**${embedIcons.warning} Oops!**\nNo permission to execute this command.\n\nThe command \`${interaction.commandName}\` cannot be executed in this server.`
|
||||
)
|
||||
.setColor(embedColors.colorError)
|
||||
.setColor(embedColors.colorWarning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -27,11 +31,16 @@ module.exports = {
|
||||
memberCount: guild.memberCount
|
||||
};
|
||||
})
|
||||
.slice(0, 50)
|
||||
.sort((a, b) => b.memberCount - a.memberCount)
|
||||
.map((guild) => `\`${guild.name} (#${guild.memberCount})\``)
|
||||
.join(', ');
|
||||
.map((guild, index) => `${index + 1}. \`${guild.name} (#${guild.memberCount})\``)
|
||||
.join('\n');
|
||||
|
||||
let embedDescription = `**Guilds (${client.guilds.cache.size} total)**\n${guildsList}`;
|
||||
let embedDescription = `**${embedIcons.bot} ${
|
||||
client.guilds.cache.size < 50
|
||||
? 'Guilds'
|
||||
: `Top ${client.guilds.cache.size} guilds`
|
||||
} by member count (${client.guilds.cache.size} total)**\n${guildsList}`;
|
||||
|
||||
if (embedDescription.length >= 4000) {
|
||||
embedDescription = `${embedDescription.slice(0, 3996)}...`;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { embedColors, systemServerGuildIds } = require('../config.json');
|
||||
const {
|
||||
embedColors,
|
||||
embedIcons,
|
||||
systemServerGuildIds
|
||||
} = require('../config.json');
|
||||
const osu = require('node-os-utils');
|
||||
const packageJson = require('../package.json');
|
||||
|
||||
@@ -16,9 +20,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**No permission**\nThe command \`${interaction.commandName}\` cannot be executed in this server.`
|
||||
`**${embedIcons.warning} Oops!**\nNo permission to execute this command.\n\nThe command \`${interaction.commandName}\` cannot be executed in this server.`
|
||||
)
|
||||
.setColor(embedColors.colorError)
|
||||
.setColor(embedColors.colorWarning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -56,7 +60,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
'**System and bot status**\n' +
|
||||
`**${embedIcons.bot} System and bot status**\n` +
|
||||
`Uptime: \`${uptimeString}\`\n` +
|
||||
`Platform: \`${platform}\`\n` +
|
||||
`CPU cores: \`${cpuCores}\`\n` +
|
||||
|
||||
Reference in new issue
Block a user