My information command does not respond. Please help

Here is my code;
const { SlashCommandBuilder, EmbedBuilder, Embed } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('info')
.setDescription(`Get some info about this server`),
async execute (interaction) {

const { guild } = interaction;
const { members } = guild;
const { name, ownerId, createdTimestamp, memberCount } = guild;
const roles = guild.roles.cache.size;
const id = guild.id;
const emojis = guild.emojis.cache.size;
const cn = guild.channels.cache.size;
let bt = guild.premiumTier

let baseVerification = guild.VerificationLevel;

if (baseVerification == 0) baseVerification = "None"
if (baseVerification == 1) baseVerification = "Low"
if (baseVerification == 2) baseVerification = "Medium"
if (baseVerification == 3) baseVerification = "High"
if (baseVerification == 4) baseVerification = "Very high"

const embed = new EmbedBuilder()
.setColor("Blurple")
.setFooter({ text: `Server ID: ${id}` })
.setTimestamp()
.addFields({ name: "Server Name", value: `${name}`, inline: false})
.addFields({ name: "Creation Date", value: `<t:${parseInt(createdTimestamp / 1000)}:R>`, inline: true})
.addFields({ name: "Owner", value: `<@${ownerId}>`, inline: true})
.addFields({ name: "Member Amount", value: `${memberCount}`, inline: true})
.addFields({ name: "Role Amount", value: `${roles}`, inline: true})
.addFields({ name: "Emoji Amount", value: `${emojis}`, inline: true})
.addFields({ name: "Verification Level", value: `${baseVerification}`, inline: true})
.addFields({ name: "Server Boost", value: `${guild.premiumSubscriptionCount}`, inline: true})
.addFields({ name: "Boost Tier", value: `${bt}/3`, inline: true})
.addFields({ name: "Total Channels", value: `${cn}`, inline: true})

await interaction.reply({ embeds: [embed] });

}

}
const { SlashCommandBuilder, EmbedBuilder, Embed } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('info')
.setDescription(`Get some info about this server`),
async execute (interaction) {

const { guild } = interaction;
const { members } = guild;
const { name, ownerId, createdTimestamp, memberCount } = guild;
const roles = guild.roles.cache.size;
const id = guild.id;
const emojis = guild.emojis.cache.size;
const cn = guild.channels.cache.size;
let bt = guild.premiumTier

let baseVerification = guild.VerificationLevel;

if (baseVerification == 0) baseVerification = "None"
if (baseVerification == 1) baseVerification = "Low"
if (baseVerification == 2) baseVerification = "Medium"
if (baseVerification == 3) baseVerification = "High"
if (baseVerification == 4) baseVerification = "Very high"

const embed = new EmbedBuilder()
.setColor("Blurple")
.setFooter({ text: `Server ID: ${id}` })
.setTimestamp()
.addFields({ name: "Server Name", value: `${name}`, inline: false})
.addFields({ name: "Creation Date", value: `<t:${parseInt(createdTimestamp / 1000)}:R>`, inline: true})
.addFields({ name: "Owner", value: `<@${ownerId}>`, inline: true})
.addFields({ name: "Member Amount", value: `${memberCount}`, inline: true})
.addFields({ name: "Role Amount", value: `${roles}`, inline: true})
.addFields({ name: "Emoji Amount", value: `${emojis}`, inline: true})
.addFields({ name: "Verification Level", value: `${baseVerification}`, inline: true})
.addFields({ name: "Server Boost", value: `${guild.premiumSubscriptionCount}`, inline: true})
.addFields({ name: "Boost Tier", value: `${bt}/3`, inline: true})
.addFields({ name: "Total Channels", value: `${cn}`, inline: true})

await interaction.reply({ embeds: [embed] });

}

}
3 Replies
d.js toolkit
d.js toolkit15mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
d.js docs
d.js docs15mo ago
If you aren't getting any errors, try to place console.log checkpoints throughout your code to find out where execution stops. - Once you do, log relevant values and if-conditions - More sophisticated debugging methods are breakpoints and runtime inspections: learn more
nestystars
nestystarsOP15mo ago
Thanks, my problem is solved now. I just forgot something in the code I guess that's why i was getting no response
Want results from more Discord servers?
Add your server