Henrique
Henrique
DIAdiscord.js - Imagine a boo! šŸ‘»
Created by Henrique on 8/5/2023 in #djs-questions
HELP
when I use the /upload command, it says "This command is out of date, try again in a few minutes" and after a while it says "The application did not respond", and nothing appears in my terminal
const { SlashCommandBuilder } = require("@discordjs/builders");

module.exports = {
data: new SlashCommandBuilder()
.setName("uploud")
.setDescription("Um comando para gerenciar a sua aplicaĆ§Ć£o.")
.addStringOption(option =>
option
.setName("aplicaĆ§Ć£o")
.setDescription('Coloque o ID da aplicaĆ§Ć£o aqui.')
.setRequired(true))
.addAttachmentOption(option =>
option
.setName("arquivo")
.setDescription('Envie o arquivo da aplicaĆ§Ć£o aqui.')
.setRequired(true))
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
run: async (client, interaction) => {
try {
let aplicaĆ§Ć£o = interaction.option.getString("aplicaĆ§Ć£o");
let attachment = interaction.options.getAttachment("arquivo");
console.log(aplicaĆ§Ć£o)
console.log(attachment)
} catch (error) {
console.error(error);
}
}
}
const { SlashCommandBuilder } = require("@discordjs/builders");

module.exports = {
data: new SlashCommandBuilder()
.setName("uploud")
.setDescription("Um comando para gerenciar a sua aplicaĆ§Ć£o.")
.addStringOption(option =>
option
.setName("aplicaĆ§Ć£o")
.setDescription('Coloque o ID da aplicaĆ§Ć£o aqui.')
.setRequired(true))
.addAttachmentOption(option =>
option
.setName("arquivo")
.setDescription('Envie o arquivo da aplicaĆ§Ć£o aqui.')
.setRequired(true))
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
run: async (client, interaction) => {
try {
let aplicaĆ§Ć£o = interaction.option.getString("aplicaĆ§Ć£o");
let attachment = interaction.options.getAttachment("arquivo");
console.log(aplicaĆ§Ć£o)
console.log(attachment)
} catch (error) {
console.error(error);
}
}
}
my discord.js version is: "discord.js": "^14.12.1"
2 replies
DIAdiscord.js - Imagine a boo! šŸ‘»
Created by Henrique on 4/8/2023 in #djs-questions
Ignore channels from a category using filter
let options = await interaction.guild.channels.cache.filter(ch => ch.type == 0).map((channel) => ({
label: `${channel.name}`,
description: `ID: ${channel.id}`,
value: channel.id,
}));
let options = await interaction.guild.channels.cache.filter(ch => ch.type == 0).map((channel) => ({
label: `${channel.name}`,
description: `ID: ${channel.id}`,
value: channel.id,
}));
i'm doing a command to get all the channels and it's working, but I wanted to ignore the channels of a specific category using the filter, how could I do that?
3 replies