One Command Registers Only
See original GitHub issueWhich package is this bug report for?
discord.js
Issue description
First, create two (or more) command files, then try to deploy them (after adding all other necessary code and files), to a container hosting service, like Railway.app (where I am getting this error, have not tried anywhere else), You’ll see only one out of however many commands you registered will show up, without any errors, and in my case, it logs successfully registered commands.
server-info.js
const { SlashCommandBuilder } = require(`@discordjs/builders`);
const { MessageEmbed } = require(`discord.js`);
module.exports = {
data: new SlashCommandBuilder()
.setName(`server`)
.setDescription(`Display info about this server!`),
async execute(interaction) {
const serverInfo = new MessageEmbed()
.setColor(`BLACK`)
.setTitle(`**Server Info**`)
.addFields(
{ name: `Server name:`, value: `${interaction.guild.name}`, inline: true },
{ name: `Total members:`, value: `${interaction.guild.memberCount}`, inline: true },
)
.setThumbnail(interaction.guild.iconURL())
.setFooter(`Bot Creator: BatemaDevelopment#0019 | BatemaDevelopment | Lukas Batema`)
.setTimestamp();
interaction.reply({ embeds: [serverInfo] });
},
};
user-info.js
const { SlashCommandBuilder } = require(`@discordjs/builders`);
const { MessageEmbed } = require(`discord.js`);
module.exports = {
data: new SlashCommandBuilder()
.setName(`user`)
.setDescription(`Display info about yourself!`),
async execute(interaction) {
const userInfo = new MessageEmbed()
.setColor(`BLACK`)
.setTitle(`**User Info**`)
.addFields(
{ name: `Your username:`, value: `${interaction.user.tag}`, inline: true },
{ name: `Your ID:`, value: `${interaction.user.id}`, inline: true },
)
.setThumbnail(interaction.user.displayAvatarURL())
.setFooter(`Bot Creator: BatemaDevelopment#0019 | BatemaDevelopment | Lukas Batema`)
.setTimestamp();
interaction.reply({ embeds: [userInfo] });
},
};
Code sample
No response
Package version
v13.6.0
Node.js version
v16.14.2
Operating system
Dockerised Alpine 3.15
Priority this issue should have
Medium (should be fixed soon)
Which partials do you have configured?
User, Channel, Message
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildBans, GuildEmojisAndStickers, GuildIntegrations, GuildWebhooks, GuildInvites, GuildVoiceStates, GuildPresences, GuildMessages, GuildMessageReactions, GuildMessageTyping, DirectMessages, DirectMessageReactions, DirectMessageTyping, GuildScheduledEvents
I have tested this issue on a development release
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top GitHub Comments
bruh, this is the first time I got this bug
Hi ! This is not a discord.js issue, but a Discord issue. I already reported it and it will be fixed soon ^-^ We have this bug since the new Applications Commands Goodbye !