nestystars
nestystars
DIAdiscord.js - Imagine an app
Created by nestystars on 9/18/2023 in #djs-questions
Command Problem
Are other users experiencing the same issue as mine? Occasionally, my commands with 100% accuracy do not function as expected. Strangely, changing the bot's token seems to temporarily resolve the problem. However, even resetting the token sometimes does not solve the issue.
3 replies
DIAdiscord.js - Imagine an app
Created by nestystars on 9/1/2023 in #djs-questions
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] });

}

}
5 replies
DIAdiscord.js - Imagine an app
Created by nestystars on 8/30/2023 in #djs-questions
I've created a server.js command designed to provide information about the server. However, I'm faci
I've created a server.js command designed to provide information about the server. However, I'm facing an issue where, unfortunately, the bot doesn't respond when this command is invoked. Can someone please help
26 replies