Henrique
Henrique
DIAdiscord.js - Imagine an app
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 an app
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